Old 11th September 2013, 14:30   #1
nc10
Junior Member
 
Join Date: Jun 2013
Posts: 16
delete $INSTDIR

Hi,

one more little question i can not resolve:

In my uninstall section i delete all my installed files.

Example: If i install my app and i choose C:\MyCompany\MyService as Installation Directory, my uninstaller will delete the content of C:\MyCompany\MyService.

How to delete the whole path C:\MyCompany\MyService?

Thanks
nc10
nc10 is offline   Reply With Quote
Old 11th September 2013, 20:26   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,172
RMDir or RMDir /R

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 12th September 2013, 08:52   #3
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Note:
In the uninstaller, $INSTDIR equals $EXEDIR. So it just contains the path where uninstall.exe is stored. If the user moved your uninstaller, you'll end up deleting the wrong files/directory. Check whether $INSTDIR is correct before you use RmDir /r.
MSG is offline   Reply With Quote
Old 12th September 2013, 09:44   #4
nc10
Junior Member
 
Join Date: Jun 2013
Posts: 16
Thanks.

RMDir or RMDir /R or RMDir /R /REBOOTOK doesn't work.

After uninstall only the last folder of the path is deleted. For example C:\MyCompany\MyService, MyService will be deleted, but MyCompany stays.

Any other idea?

Thanks.
nc10 is offline   Reply With Quote
Old 13th September 2013, 11:33   #5
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
You can use the GetParent macro: http://nsis.sourceforge.net/Docs/AppendixE.html#E.1.15
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