KrYpT
1st September 2004 19:47 UTC
Script that only makes uninstaller
Is it possible to make a script that only generates an uninstaller? That is, it must be able to self-delete, and should have the default uninstaller icon and text, etc.
The reason is that I am trying to make a patch/update for my program, and it must be able to update the uninstaller. When I try to just place the uninstall script in the update and use WriteUninstaller, then the uninstaller is full of text that says "Uninstall MyProg Update" when it really completely uninstalls MyProg. So I figure the way to get around that is to generate the uninstaller separately and extract it using a File command.
Joel
1st September 2004 22:44 UTC
Using the Delete in the proper way... why not?
KrYpT
1st September 2004 23:18 UTC
Because you can't use an ordinary installer to delete itself.
Joel
1st September 2004 23:44 UTC
After reboot? ;)
kichik
2nd September 2004 20:17 UTC
You can always do the copy and Delete /REBOOTOK yourself. You cna also simply create a temporary installer, have it create your uninstaller and use just that.
KrYpT
2nd September 2004 20:30 UTC
Here's what I ended up doing (just in case anyone else wants to use it):
... in install.nsi ...
!system "${NSISDIR}\makensis uninstall.nsi" = 0
!system "GenerateUninstall" = 0
File "/oname=$INSTDIR\Uninstall.exe" "Uninstall.exe"
... in uninstall.nsi ...
OutFile "GenerateUninstall.exe"
SilentInstall silent
Section ""
WriteUninstaller "$EXEDIR\Uninstall.exe"
SectionEnd
Section "Uninstall"
...