darshanaltekar
13th March 2007 10:43 UTC
Quit setup
strcmp $UNINSTALL "YES" 0 +6
hidewindow
writeuninstaller $WINDIR\temp\un_kat.exe
execwait $WINDIR\temp\un_kat.exe
delete $WINDIR\temp\un_kat.exe
quit
;some code
In my installer at some point i'm just checking if $Uninstall flag is set if it is set then i'm writing the uninstaller to temp folder & running it. After it finishes i'm deleting the uninstaller that i've written & quiting the my installer. But when i open my task maneger there is still Setup.exe running in processes. Why is this happening ?
Any solution?
Red Wine
13th March 2007 10:58 UTC
Remove the 'HideWindow' from your code to check out if your installer ever goes to 'Quit'.
P.S. '$WINDIR\Temp' is kind of improper that might become potential dangerous.
darshanaltekar
13th March 2007 13:22 UTC
if i remove the hide window the window is there but after my uninstaller is finished it doesnt quit the setup?
Any solution i want to quit the installer from which i invoked Uninstaller :-(
Red Wine
13th March 2007 14:05 UTC
This means the script doesn't move ahead to execute the 'Quit' command, probably remains in 'ExecWait'
darshanaltekar
13th March 2007 14:16 UTC
so how can i quit my installer plese Eed Wine suggest something.
Red Wine
13th March 2007 14:25 UTC
I've already suggested about the proper usage a few days ago in another post you were asking the same question.
The included example makensis.nsi shows the proper usage and it's pretty self explained :)
darshanaltekar
13th March 2007 17:19 UTC
I've seen that example & modified the code as
strcmp $UNINSTALL "YES" 0 end
hidewindow
writeuninstaller $WINDIR\temp\un_kat.exe
execwait $WINDIR\temp\un_kat.exe
IfErrors no_remove_uninstaller
IfFileExists "$WINDIR\temp\un_kat.exe" no_remove_uninstaller
Delete "$WINDIR\temp\un_kat.exe"
no_remove_uninstaller:
strcmp $UNINSTALL "YES" 0 +2
quit
bringtofront
end:
still same problem is there. Any suggestion
Red Wine
13th March 2007 17:32 UTC
Actually I'm not able to figure what you're trying to achieve plus already mentioned writeuninstaller $WINDIR\temp\un_kat.exe is improper unless you want to remove files into $WINDIR\temp.
Assuming that you ask users if they want to remove a previous installation before continue with the current, the makensis.exe is the way to go.
That's all I can say.
darshanaltekar
13th March 2007 17:42 UTC
In man installer i'm droping the welcome screen & showing custome window with three radio buttons as Repair,Modify & Uninstall, if it founds that the application is already installed. If user select uninstall then i'm setting the uninstall flag , writting the uninstaller to temp folder, executing uninstaller from there & now i wnt to quit my installer. But after uninstaller is finished , i'm not able to quit my installer ie it is still showing setup.exe in Task manager.
Red Wine
13th March 2007 18:06 UTC
Well, if app is already installed then uninstaller is already exists into $INSTDIR right?
Try to execute that uninstaller using the method demonstrated in makensis.nsi and then quit instead of continue the installation.
I don't know if the uninstaller that you're writing into temp has some special code to do special things...
Your installer remains running because it does not go to the Quit command.