ATTRIB -S -H -R "%USERPROFILE%\Desktop\desktop.ini" ATTRIB -S -H -R "%SYSTEMDRIVE%\Users\Public\Desktop\desktop.ini" ATTRIB -S -H -R "%SYSTEMDRIVE%\Users\Administrator\Desktop\desktop.ini" DEL /F /S /Q "%USERPROFILE%\Desktop\desktop.ini" DEL /F /S /Q "%SYSTEMDRIVE%\Users\Public\Desktop\desktop.ini" DEL /F /S /Q "%SYSTEMDRIVE%\Users\Administrator\Desktop\desktop.ini"
Even though this 90 second wait is easily long enough (it probably logs in fully after
about 30 seconds) and I can see the desktop.ini file there, this command is not
deleting the file. If I let it reboot and run the above command, it does delete the
file... does anyone know where I am going wrong or why it is not deleting the file?
ATTRIB -S -H -R means take off the "hidden/system/read only" attributes, so its
not because its a hidden system file... maybe I could put a 5 second wait between
the commands like this:
ATTRIB -S -H -R "%USERPROFILE%\Desktop\desktop.ini" ATTRIB -S -H -R "%SYSTEMDRIVE%\Users\Public\Desktop\desktop.ini" ATTRIB -S -H -R "%SYSTEMDRIVE%\Users\Administrator\Desktop\desktop.ini" SLEEP 5 DEL /F /S /Q "%USERPROFILE%\Desktop\desktop.ini" DEL /F /S /Q "%SYSTEMDRIVE%\Users\Public\Desktop\desktop.ini" DEL /F /S /Q "%SYSTEMDRIVE%\Users\Administrator\Desktop\desktop.ini"
But I have a feeling this has nothing to do with it since on XP I have removed
attributes and had the DEL command right after it with no problems.
This isn't a case of it recreating the file on reboot - because I can see the file
there and the command does not delete it.



Help

Back to top










