Solved

W2K3 Group Policy Shutdown Script

Posted on 2011-02-25
3
472 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:AGenMIS
  • 2
3 Comments
 
LVL 42

Expert Comment

by:kevinhsieh
ID: 34986149
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"
0
 

Author Comment

by:AGenMIS
ID: 35141511
Making it a logoff script worked. Any way to get it to work if I want to make it a shut down script?
0
 
LVL 42

Accepted Solution

by:
kevinhsieh earned 500 total points
ID: 35150391
You would run the same script as a shutdown script. You need to run it as both a logoff and shutdown script to get everything.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question