Old 13th March 2010, 02:11   #1
SteveRussell
Senior Member
 
Join Date: Mar 2006
Location: United States
Posts: 109
RMDir switches

I'm trying to discern the drawbacks of using /r and /REBOOTOK with RMDir. I haven't gotten very far, even after reading some older posts and concerns.

Could someone please advise me on how to decide on whether to use these switches in my installers?

Thank you very much.
SteveRussell is offline   Reply With Quote
Old 14th March 2010, 09:31   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Not much of a problem with using rebootok, except maybe that it'll pop up a 'reboot?' question on the finish page. /r however is EXTREMELY dangerous. It will delete any files, even if they don't belong to your software. Let's say your uninstaller.exe is moved from your application's directory to c:\windows. The $instdir variable will then be C:\windows as far as your uninstaller is concerned. So the command 'RmDir $INSTDIR /r' will delete ALL files and subfolders of C:\windows. You do not want this to be possible, not even in a very unlikely scenario.

Even if you add a verification for the value of $instdir, /r is dangerous. If a user installs/copies something to your installation directory, they do not expect that to be deleted automatically when they uninstall your product. Same problem if some idiot installs your software to an already existing directory (like C:\Program Files).
MSG is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump