|
|
#1 |
|
Junior Member
Join Date: Oct 2006
Posts: 26
|
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 |
|
|
|
|
|
#2 |
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
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: code: 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. Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
|
|
|
|
|
#3 | |
|
Junior Member
Join Date: Feb 2014
Posts: 7
|
Hi, this post is pretty old, but things didn't change much in NSIS.
Quoting the latest post: Quote:
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: code: The installer copies itself to $TEMP and executes itself, resulting in another copy and execution, and so on. Is there a way to do what I need? Thank you. |
|
|
|
|
|
|
#4 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
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...
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Feb 2014
Posts: 7
|
Hi Anders!
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. |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
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 |
|
|
|
|
|
#7 | |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
Quote:
The best option might actually be to use the selfdelete plugin but I'm not sure if that thing works on Vista+ IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
|
#8 | |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Quote:
Stu |
|
|
|
|
|
|
#9 | |
|
Junior Member
Join Date: Feb 2014
Posts: 7
|
Hi Afro UK and Anders.
Actually, I tried both of your suggestions (and both of them worked)! Quote:
So I tried the Anders proposal: The people who writes the 3rd party uninstaller made the requested modifications, and it worked flawlessly. 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. |
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|