Archive: My Thoughts


My Thoughts
Hi Guys,

Ive reading the forums here and looking at a few scripts and have decided to take the plunge.

I dont do many installers and when i do i have always used InnoSetup for it and whilst its an awesome product i think NSIS may be even better.

As with the grip of some people here the syntax is horrible and the docs arent the best, however the forum seems to make up for that with its skilled members.

So im going to stick with NSIS and try to learn it and come back with a more detailed report sometime soon.

Something i noticed on a few scripts out there in the uninstall section was -

RMDir /r "$INSTDIR\*.*"
RMDir "$INSTDIR"

Isnt that absolute madness? because as soon as someone installs into say x:\Program Files\ with no APP FOLDER name, on uninstall its going to be HORRIBLE :)

Theres probably a few more traps for the unexperienced too.

Thanks for your time.

Sissy


RMDir "$INSTDIR" will only remove the $INSTDIR directory if it's empty. However, RMDir /r "$INSTDIR\*.*" would be very nasty if $INSTDIR got set to program files or windows.


Try these examples. I've still got a bunch to go, but I hope these might be a decent start. Let me know if they're useful.


Perhaps NSIS should include a check that dangerous commands like RmDir do not operate on Special folders like $PROGRAMFILES, $DESKTOP, $STARTMENU, $WINDIR, etc.
Or if it does, automatically popup a warning to the user and give them a chance to cancel the setup or uninstaller.