Archive: rmdir doesn´t work correctly!?


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


Which version of NSIS are you using?


Hi,

i use the latest 2.04b version.

Best regards

Speed78


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.


... why can not I delete my own post?

Sorry, I post something wrong inside this thread, and I could not delete it by myself.


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.


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.


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?


Your English is OK, no need to apologize.

I think we'll have to find a better solution because of the above reasons.