Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dealing with application updates in Windows 7
Message
De
20/09/2010 09:11:13
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Installation et configuration
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01481764
Message ID:
01481978
Vues:
89
Hi Lynda.

>So, just to confirm: here's what currently happens in the Launcher, soon to be called Update, program:
>
>1 Check for newer version
>2 Copy to local drive if found
>3 Start the application (currently with RUN)
>
>So if steps 2 and 3 become ShellExecute() commands, the Launcher/Update should work more or less the same as before--but with the UAC dialog (hopefully, just one)?

Here's what we do for updates:

- The user runs our main app, SFQUERY.EXE as they normally would.
- Either as part of a startup function or when the user chooses a Check for Updates function from the menu, it checks our web site for a new version.
- If there is a newer version, download it to a writable directory on the user's system so there's no need for UAC yet.
- If OS(3) >= "6", meaning Vista or later, tell the user that a UAC dialog will appear next so there's no surprise for them.
- Use ShellExecute with "runas" to run a program called UPDATE.EXE. This causes the UAC dialog to appear. Then immediately QUIT.
- UPDATE.EXE copies the downloaded program to the current directory and does any additional work such as unzipping files.
- UPDATE.EXE then uses ShellExecute, without "runas", to launch SFQUERY.EXE, and immediately QUITs.

So, the UAC dialog only appears once, there's no need for a manifest on either EXE, and the latest version is installed without any hassles.

Doug
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform