The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Vista and Program Self Updating

Does anyone know how/if a program can auto-update itself on Vista?

We used to have our app check for updates, download an exe, and then run that exe which extracts, verifies, then runs a patcher exe. Under a standard user, Vista not only doesn't run the exe, it doesn't even tell you it isn't. No message box, no UAC message, and no event log message that we can find.

Vista has been a real abortion for us.
Mike Send private email
Wednesday, May 09, 2007
Simon at sometimes posts here and he lives and breathes this stuff...
Mike S Send private email
Wednesday, May 09, 2007
You'll probably need to code sign your executable; we had similar issues and solved it by getting a cert from Thawte. Good luck.
Thursday, May 10, 2007
We've already done all the signing.
Fishous Send private email
Thursday, May 10, 2007
This should not work under XP either. I'm guessing you assume all users run as administrator on XP because that is the default. A non-admin user on XP or Vista does not have write access to Program Files.

Microsoft provide the framework for this. Use an MSI which automatically delegates on a service running in the System account.
Friday, May 11, 2007
Your simplest option is to use ShellExecute() and not CreateProcess() to launch your updater exe and make sure it is flagged as admin required in the manifest. That should get you a UAC prompt.
Friday, May 11, 2007
Can you install your app somewhere other than "Program Files", and does this resolve the issue?
Friday, May 11, 2007
Use the "RUNAS" verb with ShellExecute. See

The example there is C++. If you're a .NET person then:

ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "myupdater.exe";
startInfo.Verb = "RUNAS";
Duncan Smart
Saturday, May 12, 2007
Yes, if the app is not installed to "program files" it works correctly.
Fishous Send private email
Monday, May 14, 2007
However, as a user I often get moderately annoyed by applications that are so backwards and incompetently written that they can't cope with being installed properly.

What is this, 1983 again?

Wednesday, May 16, 2007

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz