Archive: Windows XP ExecWait a program with admin rights


Windows XP ExecWait a program with admin rights
In Windows XP as a limited user I want to be able to run a custom exe and wait for it to finish as admin. The exe I want to run is a custom legacy uninstaller I have coded up. I have accomplished this in Vista with the manifest via RequestExecutionLevel Admin. However in XP there is no elevation dialog that pops up and the custom uninstaller is unable to remove files from program files and the registry. Does anyone have any solution? Any help would be greatly appreciated! Thanks!


you could call ShellExecuteEx with the runas verb and some flag to keep the process handle open(can't remember its exact name ATM, check MSDN), then just wait for that handle, you could use the system plugin for this or write your own


Thank you this method worked great.

Is there a way to do the same thing in Windows Vista from a limited account where UAC is disabled? I want to run as admin dialog to come up and it wont because it is ignoring my manifest.