Chrysalide
4th July 2005 13:09 UTC
Delete Documents and Settings\username
Hello
First of all...sorry for my very bad english...
I have a pb with my uninstaller.
For my software, I need to create a new user named "demo".
So, I want to delete it when I uninstall my soft.
I manage to do that but I'd like to delete his personal folder (documents and settings\demo)too.
But when I do that (thanks rmdir /R), it give me an error and the folder is not erased...
How can I do this ?
Thank you.
Afrow UK
4th July 2005 13:50 UTC
The folder may probably still be in use. In that case, you need to use:
RmDir /r /rebootok
This will delete it on reboot.
-Stu
Chrysalide
4th July 2005 14:15 UTC
I've already try to do that but without success...
However, I can delete this folder manually, without pb.
Have somebody another idea ?
Thanks
Comperio
5th July 2005 06:16 UTC
Make sure that the folder you are trying to delete IS NOT the working directory. (You cannot delete the working directory.) Do this by using SetOutPath to set to a different working directory first.
Example:
SetOutPath "C:\foo"
RMDir /r "C:\Documents and Settings\demo"
Chrysalide
5th July 2005 08:07 UTC
Yes, I've done that but it's always the same...the demo folder isn't deleted...
Arg...
Somebody has another idea to help me...please ?
Thanks for those answers !
Afrow UK
5th July 2005 11:17 UTC
It isn't deleted after reboot either?
-Stu
Chrysalide
6th July 2005 07:42 UTC
No, it's not deleted even after reboot.
For the moment, I've found another solution, but it's a little "violent" :
nsExec::Exec 'cmd /C rmdir "c:\documents and settings\demo" /S /Q'
Have you another better idea ?
Thanks a lot for all your answers !