PC Review


Reply
Thread Tools Rate Thread

Defrag and Disk Cleanup Utils automated in Task Scheduler

 
 
=?Utf-8?B?SmFzb24gQmVubmV0dA==?=
Guest
Posts: n/a
 
      14th Jan 2004
My apologies if there's an MS.com article on this, but I'm having trouble finding out how to getting a scheduled task to do anything more than merely open the program. I'm currently trying to automate tasks such as Defrag and Disk Cleanup monthly on a couple of XP Pro boxes, but using the Scheduler wizard, it merely opens the program and waits for user input. I've found articles suggesting that I should use Defrag.exe with switches, rather than Dfrg.exe, but it's not clear how to use the switches in Task Scheduler. My assumption is that scripting is involved for both of these cases. I'm interested in pursuing this route, as I've not done any command line scripting before, and this would be a great way to learn. Does anyone have any pointers to more info about this, or merely a solution to my problem? Thanks heaps

Jason Bennett
 
Reply With Quote
 
 
 
 
MAP
Guest
Posts: n/a
 
      14th Jan 2004

>-----Original Message-----
>My apologies if there's an MS.com article on this, but

I'm having trouble finding out how to getting a scheduled
task to do anything more than merely open the program.
I'm currently trying to automate tasks such as Defrag and
Disk Cleanup monthly on a couple of XP Pro boxes, but
using the Scheduler wizard, it merely opens the program
and waits for user input. I've found articles suggesting
that I should use Defrag.exe with switches, rather than
Dfrg.exe, but it's not clear how to use the switches in
Task Scheduler. My assumption is that scripting is
involved for both of these cases. I'm interested in
pursuing this route, as I've not done any command line
scripting before, and this would be a great way to
learn. Does anyone have any pointers to more info about
this, or merely a solution to my problem? Thanks heaps-
>
>Jason Bennett
>.
>

Hi Jason,Hope this helps

http://www.informationweek.com/story/showArticle.jhtml?
articleID=15600170
 
Reply With Quote
 
John
Guest
Posts: n/a
 
      14th Jan 2004
Yeah, I just went through this. The short answer is open notepad and
type the following:
defrag.exe c: (where "c:" is the appropriate drive letter)
cleanmgr.exe /sagerun:n

Save it and change the extension from .txt to .bat. Voila! You've made a
batch file.

Now the important part. Get to the command prompt (Start>Run and type
cmd) and type "cleanmgr.exe /sageset:n", which will give you a dialogue
box. Make the appropriate clean up settings. Schedule your batch file
and you're done.

BTW- MAP posted a good, informative link. I read it twice. :-)

BTW- More good info, thanks to Carey Frisch [MVP]:
1. Open XP's "Help and Support" program.
2. In the Search box type: COMMAND-LINE , and hit enter.
2a. Click on "Managing System Information from the command line"
3. Then click on "Command-line reference A-Z".

John


MAP wrote:
>>-----Original Message-----
>>My apologies if there's an MS.com article on this, but

> I'm having trouble finding out how to getting a scheduled
> task to do anything more than merely open the program.
> I'm currently trying to automate tasks such as Defrag and
> Disk Cleanup monthly on a couple of XP Pro boxes, but
> using the Scheduler wizard, it merely opens the program
> and waits for user input. I've found articles suggesting
> that I should use Defrag.exe with switches, rather than
> Dfrg.exe, but it's not clear how to use the switches in
> Task Scheduler. My assumption is that scripting is
> involved for both of these cases. I'm interested in
> pursuing this route, as I've not done any command line
> scripting before, and this would be a great way to
> learn. Does anyone have any pointers to more info about
> this, or merely a solution to my problem? Thanks heaps-
>>
>>Jason Bennett
>>.
>>

> Hi Jason,Hope this helps
>
> http://www.informationweek.com/story/showArticle.jhtml?
> articleID=15600170


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automated Excel Workbooks and Task Scheduler MSweetG222 Microsoft Excel Programming 0 28th Apr 2008 04:43 PM
Task Scheduling Disk Cleanup, Defrag and Checkdisk Utilities. =?Utf-8?B?Qm9iIERlYg==?= Windows XP General 5 12th Apr 2006 05:19 AM
run disk defrag from the task scheduler Rocket J. Squirrel Windows XP Performance 1 5th Jun 2004 05:04 PM
Task Scheduler programming for automatic daily disk cleanup Bob Smith Microsoft Windows 2000 Setup 0 18th Apr 2004 09:20 AM
Disk Defrag not available in Task Scheduler =?Utf-8?B?TWlrZSBE?= Windows XP New Users 4 26th Feb 2004 05:52 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:56 PM.