Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vista problem
Message
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Title:
Miscellaneous
Thread ID:
01251167
Message ID:
01265097
Views:
26
Doug,

I like the idea of having the launcher use ShellExecute to load a copier EXE with elevated privileges. Unfortunately, ShellExecute runs asychronously so you don't know when the copier EXE has completed. Any thoughts on how to overcome that limitation?

TIA

-Dan

>Hi Don.
>
>>I have an in-house app that is installed on each local users PC in a subfolder in Program Files. The main EXE is launched by a LAUNCHER.EXE which checks the network for a newer version of the main EXE before runnung the main exe. If it finds a newer version is available, it copies the newer exe to overwrite the older version before launching the main program. This has always worked fine and provides an easy method to keep all my users current with the latest version of the program.
>>
>>Vista however does not allow the overwrite. Has anyone else experienced this situation and are there settings somewhere in Vista to return to the old behaviour (or some other work around)?
>
>If the application is installed in C:\Program Files, you can't write to that folder unless the application is running as an elevated task. You have a few choices:
>
>- Set permissions on the app folder so all users can write to it. This is a bad idea because it opens a huge security hole on the user's system.
>
>- Install the application in a folder that isn't under C:\Program Files that's writable. Bad idea for the same reason.
>
>- Run the application from the server rather than the local workstation. The idea of an app launcher was a good idea ten years ago when we had 10 MPS networks. However, with today's fast servers and 100 MBPS or even gigabit networks, there really isn't much of a performance issue with installing the app on the server and running it from the workstations.
>
>- Have your LAUNCHER.EXE do this: when it determines it needs to overwrite the main EXE, run another EXE to do the actual copying. That EXE doesn't do anything more than the current LAUNCHER does (ie. copying the file from the server to the local system), but the trick is that LAUNCHER runs it as an elevated task using ShellExecute with "RunAs" as a parameter; see http://doughennig.blogspot.com/2007/04/elevating-tasks-in-vista.html for details. This means the user will get a UAC dialog asking them to confirm it, but you can display a dialog before running the copier EXE telling them the app is being updated and that they'll get a UAC dialog (the latter only if OS(3) >= "6").
>
>Hope this helps.
>
>Doug
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform