Unsolved

This post is more than 5 years old

29 Posts

9927

January 28th, 2004 19:00

Scheduled Taks - Windows XP Pro

Hello Everyone:

   I have a new Dell PC - that I would like to apply some scheduled taks to - here's what I've done so far - let me know if you guys can help:

    1: Partitioned the HD so that Windows XP (PRO) is on drive C: (36 GB)

    2: I made the remaining four GB into drive D:

    3: Set up a password protected ADMIN account - to use scheduled taks

----

  Now - I want to set up scheduled tasks to automatically format drive D: every week (SAT - 11 AM to be exact) - I am having some problems - here are the next few things I did...:

   1: Set up task scheduler so that Command Prompt would run every SAT at 11 AM

   2: Set the run command for command prompt to be:

              %SystemRoot%\system32\cmd.exe format d: /q /y

   3: Set the task to run as the ADMIN account with the password (all accounts on this machine are administrators - so there shouldn't be problems...)

----

  When I run the format task - disk drive D: does not format - the task says "Running" but - after several hours - the drive has still not formatted...

  If I were to go into command prompt and type format d: /q /y - and hit enter the thing formats in 60 seconds flat.

----

  Any reason why this isn't working as a scheduled task - if so - how can I resolve the issue?

Thanks in advance!

Message Edited by Cpudan80 on 01-28-2004 04:47 PM

2 Intern

 • 

2K Posts

January 28th, 2004 22:00

My Command Prompt    Format  /?   doesn't show any   /y    (yes)  . ?

29 Posts

January 29th, 2004 00:00

The /y allows the format command to run silently (and yes --- you're right, it answers yes to the "Are you sure..." question)

I've now found out that - when I run the %SystemRoot%\system32\cmd.exe format d: /q /y as a scheduled task - it just opens command prompt - with the directory set to C:\Window\System32 -- don't no how to tell the scheduled task thing to literally type format d: /q /y - i'm sure there is a way...

Any other ideas!

Thanks in advance!

Dan B.

GetawayplaceNC.com Domain Admin

Message Edited by Cpudan80 on 01-28-2004 09:02 PM

426 Posts

January 29th, 2004 00:00

Perhaps you could write the instuction in a batch file (.bat) and have the scheduler execute that.

@echo off

%SystemRoot%\system32\cmd.exe format d: /q /y

exit

Message Edited by BBlackie on 01-28-2004 08:43 PM

426 Posts

January 29th, 2004 01:00

Yup....whateveryouwanttocallit.bat   Let us know if it's successful.

29 Posts

January 29th, 2004 01:00

So --- just open notepad - copy that code - and save as .bat correct?

Then have Task Scheduler run the .bat instead...

Sounds good to me!

Thanks - will try that tomorrow!

 

29 Posts

January 29th, 2004 21:00

Thanks Guys!

I programmed a batch file - to run the DOS command as stated - and it works wonders!

Just in case anyone is interesting here was the code I used

------------------

Format D: /q /y

------------------

Then set scheduled task to run the BAT file every SAT at 11 AM - tested it - works great!

------------------

PS. For anyone who is interested - Scheduled tasks has a safeguard to prevent it from running the command line format command... Found that out after...

 

Thanks for the help!

Daniel B.

GetawayplaceNC.com Domain Administrator

Looking for a Vacation in OBX? If so visit Getaway Place's website:

http://www.GetawayplaceNC.com

Message Edited by Cpudan80 on 01-29-2004 06:27 PM

No Events found!

Top