Archive: Uninstall (delete directory)


Uninstall (delete directory)

hello there, i'm new to the forums here

i was wondering if there is an option in NSIS to allow the computer to prompt the user to restart the computer in the midst of uninstallation, and have the uninstaller continue after a restart.

currently the situation i'm facing is that some of the files in the directory that i'm deleting isn't deleted (because explorer.exe is using them)

so far i've tried restarting stopping and starting explorer.exe in the midst of uninstallation, but that made the uninstaller stop running altogether. i have also tried writing a batch file to delete the folder on the next startup (worked fine until i realised the folder required administrator permission) but didn't work in the end.



any people out there that can give me any ideas or directions? :)


http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.1.8
(tip: REBOOTOK)


sorry for the late reply
thanks for your help! i tried it and it worked perfectly (:

however now i'm looking into my uninstall code if it uninstalls what is installed or uninstalls the whole directory, never thought of this before =\


Always uninstall what was installed. RMDir /r is always a bad idea. If someone copied Uninstall.exe to C:\ or if the uninstall path reg key is missing you will delete everything on the machine.

Stu



yeah, i read about the complications of using RMDir /r in the link given
trying to make my uninstaller uninstall what i installed now :)

thanks for all the help though!