Link to home
Start Free TrialLog in
Avatar of AGenMIS
AGenMIS

asked on

W2K3 Group Policy Shutdown Script

I created a batch file to delete temp files. I added this file to the shutdown script in Group Policy but it doesn't seem to be deleting my temps. Will this work through Group Policy? Below is what I came up with.

RD /S /Q %temp%
RD /S /Q C:\Windows\Temp
Avatar of kevinhsieh
kevinhsieh
Flag of United States of America image

Is it not deleting from either location, or just not %temp%? This is a shutdown script, so the %temp% that you see is part of your profile, which isn't part of the system profile and hence it isn't affected by the shutdown script. If you want the individual %temp% directories to get cleaned out you need to make it a logoff script.

you can also try "del %temp%\*.* /s /q"
Avatar of AGenMIS
AGenMIS

ASKER

Making it a logoff script worked. Any way to get it to work if I want to make it a shut down script?
ASKER CERTIFIED SOLUTION
Avatar of kevinhsieh
kevinhsieh
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial