Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

W2K3 Group Policy Shutdown Script

Posted on 2011-02-25
3
Medium Priority
?
498 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Organizations create, modify, and maintain huge amounts of data to help their businesses earn money and generally function.  Typically every network user within an organization has a bit of disk space to store in process items and personal files.   …
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

730 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