Scheduled Tasks

L

lacyrobin

I want to schedule disk cleanup to run automatically -
works well enough but gets to the part where one can
choose ok or cancel, then since no one is awake to do it
nothing else happens. Please help me overcome this issue
so that it proceeds by itself.
Thanks,
Lacy
 
J

John

Yeah, but... What are the numbers to use with sageset & sagerun? For
instance, I just want to clean Temporary Internet Files and the Recycle
Bin, so how do I specify that?

Thanks.

John
 
T

Thorsten Matzner

John said:
Yeah, but... What are the numbers to use with sageset & sagerun? For
instance, I just want to clean Temporary Internet Files and the Recycle
Bin, so how do I specify that?

"/sageset: n - This option displays the Disk Cleanup Settings dialog
box and also creates a registry key to store the settings that you
select. The n value, which is stored in the registry, allows you to
specify tasks for Disk Cleanup to run. The n value can be any integer
value from 0 to 65535. To have all of the options available when you
use the /sageset option, you might need to specify the drive where
Windows is installed."
As far as I understand that: make your settings, look up the mentioned
Registry key and take over the SAGESET number from here into the
command-line.
 
J

John

Thanks. I hadn't used the sageset option before, but it looks like what
I wanted.

Registry key- The best I could find was
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches
where each subkey has the dWord StateFlags0000. 2 is selected, 0 is
unselected.

So it seems that after doing /sageset: n and making selections,
scheduling the task 'cleanmgr.exe /sagerun: n' will use those
selections. No integer values needed.

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top