- NSIS Discussion
- rmdir doesn´t work correctly!?
Archive: rmdir doesn´t work correctly!?
Speed78
17th December 2003 21:48 UTC
rmdir doesn´t work correctly!?
Hi,
my uninstall section looks like this...
------
; Delete Files and Directories
Delete /REBOOTOK "$INSTDIR\Daten\*.*"
Delete /REBOOTOK "$INSTDIR\*.*"
RMDir /REBOOTOK "$INSTDIR\Daten"
RMDir /REBOOTOK "$INSTDIR"
------
In $INSTDIR there is a file that cannot be deleted, because the file is in use. After a reboot the file is deleted but the directory still exists. This only happens on Win9x and WinME machines. On Win2000 and WinXP it works correctly.
Any Ideas??
Best regards
Speed78
kichik
17th December 2003 22:10 UTC
Which version of NSIS are you using?
Speed78
18th December 2003 18:02 UTC
Hi,
i use the latest 2.04b version.
Best regards
Speed78
kichik
18th December 2003 19:14 UTC
Hmm... It seems wininit.ini, which is what NSIS uses to delete folders on Windows 9x with /REBOOTOK, can't delete folders. I'll update docs and try to find some solution in the next version.
For now, you can create another small installer or even a batch file which will delete the folder and set it to run in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run.
s793016
19th December 2003 06:44 UTC
... why can not I delete my own post?
Sorry, I post something wrong inside this thread, and I could not delete it by myself.
s793016
27th December 2003 10:27 UTC
Sorry, my English is very poor.
I found that Wininit.ini in Win9x Do delete folders.
Just use "DIRNUL=" to do that.
And this will delete all things inside that folder.
kichik
27th December 2003 17:28 UTC
Is there any documentation from Microsoft on that feature? All I have been able to find is some "trick lists" that mention this. I tested it on Windows ME and it did work, but nothing says it works on Windows 95 and Windows 98. Furthermore, it recursively deletes all files in the folder unlike MoveFileEx which only removes empty folders as RMDir is supposed to do without the /r switch.
s793016
28th December 2003 06:31 UTC
Sorry, my English is very poor.
I known that because I use HexEditor (ex: UltraEdit ... etc.) to find those ASCII String inside Wininit.exe by handywork.
I found wininit.exe at both Win98SE & WinME do content that ASCII String, and tested OK.
Maybe someone could provide a Win95 version Wininit.exe to search that Ascii String?
kichik
1st January 2004 17:00 UTC
Your English is OK, no need to apologize.
I think we'll have to find a better solution because of the above reasons.