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
Uninstaller error levels
9 posts
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:
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:
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.CopyFiles $INSTDIR\uninstaller.exe $TEMP
ExecWait '"$TEMP\uninstaller.exe" _?=$INSTDIR' $0
DetailPrint "uninstaller set error level $0"
Hi, this post is pretty old, but things didn't change much in NSIS.
Quoting the latest post:
My uninstaller is going to be executed by a 3rd party uninstaller (I can't modify it), and that 3rd party uninstaller expect a return code from my uninstaller.
If I put these lines in my code, they are executed recursively:
Is there a way to do what I need?
Thank you.
Quoting the latest post:
I need to get a return code from my uninstaller, but I don't have installation A and installation B.Originally Posted by Red Wine View PostAlso 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.
My uninstaller is going to be executed by a 3rd party uninstaller (I can't modify it), and that 3rd party uninstaller expect a return code from my uninstaller.
If I put these lines in my code, they are executed recursively:
The installer copies itself to $TEMP and executes itself, resulting in another copy and execution, and so on.CopyFiles $INSTDIR\uninstaller.exe $TEMP
ExecWait '"$TEMP\uninstaller.exe" _?=$INSTDIR' $0
Is there a way to do what I need?
Thank you.
Can this uninstaller pass a parameter to the NSIS uninstaller? If not, it is not going to be possible to wait for the real NSIS uninstaller...Originally Posted by orhuidobro View PostMy uninstaller is going to be executed by a 3rd party uninstaller (I can't modify it), and that 3rd party uninstaller expect a return code from my uninstaller.
Hi Anders!Originally Posted by Anders View PostCan this uninstaller pass a parameter to the NSIS uninstaller?
Actually, I'm not sure if I can get that, but I can try. I do know that installer isn't made with NSIS.
In case I can get it, which parameter should I pass? My uninstaller must run silently.
Thanks and best regards.
How about having them run an included wrapper executable which itself executes the uninstaller with the required parameters and returns its exit code?
To run the uninstaller silently, use the case sensitive /S switch (must come before _?=). You could also just add SilentUninstall silent if it should always be ran silently.
Stu
To run the uninstaller silently, use the case sensitive /S switch (must come before _?=). You could also just add SilentUninstall silent if it should always be ran silently.
Stu
Where is he supposed to store this wrapper? In $InstDir? Then you are back to square one again and you are unable to delete $InstDir.Originally Posted by Afrow UK View PostHow about having them run an included wrapper executable which itself executes the uninstaller with the required parameters and returns its exit code?
The best option might actually be to use the selfdelete plugin but I'm not sure if that thing works on Vista+
SelfDel works up to and including Windows 8 (32/64-bit).Originally Posted by Anders View PostWhere is he supposed to store this wrapper? In $InstDir? Then you are back to square one again and you are unable to delete $InstDir.
The best option might actually be to use the selfdelete plugin but I'm not sure if that thing works on Vista+
Stu
Hi Afro UK and Anders.
Actually, I tried both of your suggestions (and both of them worked)!
So I tried the Anders proposal:
Thanks a lot for your disinterested help (both of you)!
I think the included documentation isn't clear enough, but you really helped me to get the things working.
Actually, I tried both of your suggestions (and both of them worked)!
I wrote my own wrapper, and it worked like a charm. But I noted that still have to ask for the 3rd. party installer to locate that wrapper outside my INSTDIR, and execute it.Originally Posted by Afrow UK View PostHow about having them run an included wrapper executable which itself executes the uninstaller with the required parameters and returns its exit code?
So I tried the Anders proposal:
The people who writes the 3rd party uninstaller made the requested modifications, and it worked flawlessly.Originally Posted by Anders View PostCan this uninstaller pass a parameter to the NSIS uninstaller?
Thanks a lot for your disinterested help (both of you)!
I think the included documentation isn't clear enough, but you really helped me to get the things working.