Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programmatically Run as administrator
Message
De
12/03/2013 21:24:04
 
 
À
11/03/2013 10:36:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01567986
Message ID:
01568140
Vues:
89
Hi Tore.

>I am building a new program launcher, and this program needs to copy some files to the program directory if they are missing or newer. Now I detect whether missing or newer files exist, and if necessary ask the user to rerun the program as administrator. This is not very user friendly, can anyone tell me how to automate this? I realize that they will get a warning, and I can live with that.

Move the code copying files to a different EXE, then launch that EXE as administrator. See http://doughennig.blogspot.ca/2007/04/elevating-tasks-in-vista.html for code about how to do that.

Doug
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform