Prev Previous Post   Next Post Next
Old 23rd November 2015, 20:50   #1
dolu
Junior Member
 
Join Date: Nov 2015
Posts: 1
ExecWait and run uninstall elevated

Hi all,
I'm trying to get an installer which uninstall previous version if needed.
So, everything is ok when the windows user is admin
But for a classical user, install part works well, but ExecWait never returns.

code:
...
!include "UAC.nsh"
...
RequestExecutionLevel admin
...
Function .onInit
!insertmacro UAC_RunElevated
...
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "$msgAlreadyInstalled" IDOK uninst
Abort
;Run the uninstaller
uninst:
ClearErrors
ExecWait '$R0 _?=$INSTDIR'
IfErrors no_remove_uninstaller done
no_remove_uninstaller:
...
done:
FunctionEnd
...



What's wrong ?
Is there another way to call the uninstaller inside the installer ?
Thanks.
dolu is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
auto, elevated, execwait, uninstall

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