Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   delete $INSTDIR (http://forums.winamp.com/showthread.php?t=370938)

nc10 11th September 2013 13:30

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

Anders 11th September 2013 19:26

RMDir or RMDir /R

MSG 12th September 2013 07:52

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.

nc10 12th September 2013 08:44

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.

MSG 13th September 2013 10:33

You can use the GetParent macro: http://nsis.sourceforge.net/Docs/AppendixE.html#E.1.15


All times are GMT. The time now is 17:21.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.