Old 19th February 2008, 23:25   #1
jlanza
Junior Member
 
Join Date: Feb 2008
Posts: 7
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!
jlanza is offline   Reply With Quote
Old 20th February 2008, 00:12   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,190
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

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 20th February 2008, 15:51   #3
jlanza
Junior Member
 
Join Date: Feb 2008
Posts: 7
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.
jlanza is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump