Nniol
11th January 2007 14:47 UTC
Uninstaller error levels
Hi
I need to get the error levels from an uninstaller...
I see
CopyFiles $INSTDIR\uninstaller.exe $TEMP
ExecWait '"$TEMP\uninstaller.exe" _?=$INSTDIR' $0
DetailPrint "uninstaller set error level $0"
In section D.1 in the manual.... so how does this work?
Where do I put this??? I have my normal uninstall section does this go in there, if so where does the uninstall code go?
Nniol
Red Wine
11th January 2007 16:39 UTC
I'm not quite sure what are you trying to achieve. The manual is pretty clear:
Note that uninstallers copy themselves to the temporary directory and execute from there so the original uninstaller can be deleted. This means the error level the uninstaller sets is not available to the executing process, unless it simulates this copy process and executes the copied uninstaller. To simulate this process, use:
CopyFiles $INSTDIR\uninstaller.exe $TEMP
ExecWait '"$TEMP\uninstaller.exe" _?=$INSTDIR' $0
DetailPrint "uninstaller set error level $0"
Also this code executes the uninstaller of installation A from the installer of installation B. The included in examples makensis.nsi is pretty self explained on that.