Results 1 to 7 of 7

Thread: Downloading and replacing and exe file on Vista

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2001
    Location
    West Palm Beach, Florida
    Posts
    188

    Downloading and replacing and exe file on Vista

    I wrote a very simple routine that will download the latest .exe file from my website. Then simply kill the old .exe and replace it with the new one. This worked 100% on XP but I cannot do it on Vista. I have tried all other means. Compressing the file, renaming it to a .txt file etc. As soon as I try to rename it to .exe (FileCopy updfile.txt, myapp.exe) then it is unable to do that.

    Is there any backdoor way. I don't want my end users to deploy and entire install set simply to replace the .exe file.

    I have tried to run as administrator with and without the UAC turned on.

    If I solve this problem then my app will finally run on Vista...

    Please Help.

    Chris

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Downloading and replacing and exe file on Vista

    Its probably because you are downloading it to a protected directory. Where?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Feb 2001
    Location
    West Palm Beach, Florida
    Posts
    188

    Re: Downloading and replacing and exe file on Vista

    I'm trying to replace my .exe fil in the app folder which is c:\program files\myapp

    I realize that this folder is protected but I need to get a quick way of replacing my .exe file.

    I have since my original post descovered that if I run my program as the administrator it allows me to extract a zip file with an exe file in it.

    Here is the new problem and I hope someone can shed some light on this.
    First of all just so you are up to speed. I'm testing my install set on also app on Vista. So I'm installing it do a few test then a restore my Vista computer back to where it was before the install. I then make the required changes and run the install set again.

    At some point yesterday it went 100% with the install and when I right click on my App icon and select run as administrator I was OK. No this morning after compiling a new install set (Only change was I updated my RTF file which contacined my EULA) I tried it on Vista again. Now when I try and run my APP as the administrator I get a Run Time Error 0 If I simply run it then it works fine. I only get the run time as soon as I try to run it as the administrator. Have not idea why let alone how come it worked yesterday and not today.

    Please help if anyone know Vista well enough to explain when my App will run as the Administrator and when not

    Thanks For all you help

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Downloading and replacing and exe file on Vista

    You should be using Virtual PC 2007 to create virtual images where you can install and test without affecting your OS install.

    If your exe is not signed with a valid certificate then it will possibly need to be unblocked so it can run.

    With replacing the exe in the program files directory, its a protected file system directory and even under administrator account you will have problems with it unless you elevate the process and run it as administrator.

    You really should be using an installation program to update your app as it would eliminate most of the issues you are having.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Feb 2001
    Location
    West Palm Beach, Florida
    Posts
    188

    Re: Downloading and replacing and exe file on Vista

    Thanks for you input. Yes I figured I might be better to let an install program handle it for me.


    I currently have Installshield Express 5.0. My installset it 52Mb big. (Have many controls and it is a huge app)

    I don't want my customers to have to download the 52Mb file everytime and re-install to do an upgrade. Therefore I need to get an installation program that can help me create a small update file which wil basically update only a few new files that I specify.

    I know Installshield had a bigger version that can do that, but
    a. I cannot afford it.
    b. I never got any good support. In fact many of their links on their website is not even working.

    So I would hate to stick to their software as the company is just to big.

    Can anyone recommend any other type of installation prackage ?

    Chris

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Downloading and replacing and exe file on Vista

    Yes, there are some links in the Application Deployments FAQ thread to some decent installers. Check which does what you need and go with it.

    Providing a update feature where the installer will only download the updated file(s) is what to look for.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width