Jump to content

Recommended Posts

Posted
How pretty a solution do you want to make it, you could use psexec in a batch file with the "defrag.exe c:" command which is in xp and will defrag in the background which is probably the simplest. You can also use WMI in vbs to remotely execute and moniter the same command if you have the domain firewall profile setup right on your clients.
Posted

Hiya,

 

This is my defrag group policy startup script, it adds a scheduled task...

 

 

schtasks.exe /create /SC WEEKLY /D SAT /TN Defragmentation /TR "\"C:\windows\system32\defrag.exe\"c: -f" /ST 00:45:00 /SD 01/01/2009 /RU SYSTEM

 

This creates a weekly task which starts at 00:45!

 

Hope this helps!,

 

Mart

Posted

Hey Mart,

 

That looks great, thanks! Will give it a try monday morning. Do you or anybody else have something simular to perform a disk cleanup or run ccleaner?

 

Thanks.

Posted
Hey Mart,

 

That looks great, thanks! Will give it a try monday morning. Do you or anybody else have something simular to perform a disk cleanup or run ccleaner?

 

Thanks.

 

Hiya,

 

No sadly not, although i might look into the disk cleanup as that might be useful!

 

Cheers, Mart

Posted

You might want to look into using:

 

cleanmgr.exe /sageset:50

 

This will show a panel where you can tick what items you want cleaning up. These settings are stored in the registry.

 

cleanmgr.exe /sagerun:50

 

Will run the cleanup commands you configured earlier.

 

If you do the /sageset:50 part when building your base image then you could execute the cleanup on a shutdown, remotely, or via a scheduled task.

 

This page explains the process a bit more with references to the location in the registry where the settings are stored: Automate Disk Cleanup using Task Scheduler in Windows XP

 

Ross

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...