How can I create a login script that will delete the contents of the folder below, each time a user logs off of a PC? (We have a shared PC that about a dozen users use, for a particular program. That program caches their AD login credentials in the directory below, which often creates problems when their AD password is reset. The solution is to clear the folder contents each time the users logs off of the PC).
C:\Documents and Settings\%username%\Application Data\Identities*.*
So, I've tried to create a script using the 'del' command with the /q switch. But, testing it with a manual execution first from the command prompt, it never works, says the directory cannot be found.
C:\del /q C:\Documents and Settings\%username%\Application Data\Identities*.*