Old 8th September 2005, 08:04   #1
Joof
Junior Member
 
Join Date: Sep 2005
Posts: 3
Removing $INSTDIR Folder

It installs the application to Program Files\Appname. When I run the uninstall from add/remove programs it will remove the appname directory. When I run the shortcut from the start menu it won't remove it - it removes everything within the directory, but not the directory itself.

The uninst.exe is in the appname folder.

The uninstall script is:

Section Uninstall
Delete "$SMPROGRAMS\Appname\Uninstall.lnk"
Delete "$SMPROGRAMS\Appname\Appname Manager.lnk"
Delete "$SMPROGRAMS\Appname\Appname.lnk"

DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
DeleteRegKey HKLM "SOFTWARE\Appname"
SetAutoClose true

RMDir "$SMPROGRAMS\Appname"
RMDir /r "$INSTDIR"
RMDir "$INSTDIR"
SectionEnd

Anyone know how I can get the uninstall to remove the actual base folder when I run either the start menu link or the uninst.exe in the folder?
Joof is offline   Reply With Quote
Old 8th September 2005, 08:18   #2
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
If you use NSIS v2.09. Then try:
code:

...
SetOutPath $TEMP
RMDir "$SMPROGRAMS\Appname"
RMDir /r "$INSTDIR"
SectionEnd

Instructor is offline   Reply With Quote
Old 8th September 2005, 08:24   #3
Joof
Junior Member
 
Join Date: Sep 2005
Posts: 3
Hooray :]

Thank-you for the quick reply Instructor. That fixed my problem.
Joof 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