From: GreyWolf on
I am trying figure to setup a process to defrag the local C: drive on a
computer in a domain enviroment. We are running Windows XP. I have tried to
setup a scheduled task but I am having problems with it getting it to run
under non-administrative accounts. I would like to set this up and include it
in our syspreped image for future computers. Any help would be appreciated.

GC
From: Shenan Stanley on
GreyWolf wrote:
> I am trying figure to setup a process to defrag the local C: drive
> on a computer in a domain enviroment. We are running Windows XP.
> I have tried to setup a scheduled task but I am having problems
> with it getting it to run under non-administrative accounts. I
> would like to set this up and include it in our syspreped image for
> future computers. Any help would be appreciated.

Why are you trying to setup the defragmentation scheduled task under a
non-administrative account? Just set a scheduled task under an
administrative account - you don't have to be logged on to run a scheduled
defragmentation.

--
Shenan Stanley
MS-MVP
--
How To Ask Questions The Smart Way
http://www.catb.org/~esr/faqs/smart-questions.html


From: GreyWolf on
Ok then I was doing correctly. Logon with a local admin account set the task
up and even though it does not show up under a non-admin account logon it
still runs. Correct? The reason I am stating this is I was told by a
co-worker that I was wrong

"Shenan Stanley" wrote:

> GreyWolf wrote:
> > I am trying figure to setup a process to defrag the local C: drive
> > on a computer in a domain enviroment. We are running Windows XP.
> > I have tried to setup a scheduled task but I am having problems
> > with it getting it to run under non-administrative accounts. I
> > would like to set this up and include it in our syspreped image for
> > future computers. Any help would be appreciated.
>
> Why are you trying to setup the defragmentation scheduled task under a
> non-administrative account? Just set a scheduled task under an
> administrative account - you don't have to be logged on to run a scheduled
> defragmentation.
>
> --
> Shenan Stanley
> MS-MVP
> --
> How To Ask Questions The Smart Way
> http://www.catb.org/~esr/faqs/smart-questions.html
>
>
> .
>
From: Shenan Stanley on
GreyWolf wrote:
> I am trying figure to setup a process to defrag the local C: drive
> on a computer in a domain enviroment. We are running Windows XP.
> I have tried to setup a scheduled task but I am having problems
> with it getting it to run under non-administrative accounts. I
> would like to set this up and include it in our syspreped image for
> future computers. Any help would be appreciated.

Shenan Stanley wrote:
> Why are you trying to setup the defragmentation scheduled task
> under a non-administrative account? Just set a scheduled task
> under an administrative account - you don't have to be logged on to
> run a scheduled defragmentation.

GreyWolf wrote:
> Ok then I was doing correctly. Logon with a local admin account
> set the task up and even though it does not show up under a
> non-admin account logon it still runs. Correct? The reason I am
> stating this is I was told by a co-worker that I was wrong

I don't know what you are using for your command line in the scheduled task,
but I am assuming you are setting it up to run whether or not you are logged
on and you are specifying the credentials and/or setting it up as SYSTEM.

You can have it log the results (in a way):

defrag %systemdrive% -f >> %systemdrive%\defrag.log

If the above is your command line in the scheduled task (with credentials
you manually set to an administrative level user and/or SYSTEM account...)
then some time after it runs you should find the output of the command in
the root of the system drive of the machine, starting with something like:

"Windows Disk Defragmenter
Copyright (c) 2001 Microsoft Corp. and Executive Software International,
Inc.

Analysis Report"

The log file should quiet the co-worker and ease your fears of being
incorrect.

With a list of machines, adminstrative rights and a batch script you could
setup the scheduled task pretty simply on all the machines you want
remotely, as SYSTEM if you like. A little more effort (a share where
everyone can write, etc) you could even have them logging to a central
location. With a little more - heck - they could log it and email to you,
everytime it ran, the resulting log file.

--
Shenan Stanley
MS-MVP
--
How To Ask Questions The Smart Way
http://www.catb.org/~esr/faqs/smart-questions.html


From: GreyWolf on
I do appreciate the time you have taken in helping me with this. I have done
what you have sugguested prior to your posting earlier this morning when I
looking at the details of the defrag command and sent the log file and how to
do it to my co-worker.

I hope you have a Blessed day.

"Shenan Stanley" wrote:

> GreyWolf wrote:
> > I am trying figure to setup a process to defrag the local C: drive
> > on a computer in a domain enviroment. We are running Windows XP.
> > I have tried to setup a scheduled task but I am having problems
> > with it getting it to run under non-administrative accounts. I
> > would like to set this up and include it in our syspreped image for
> > future computers. Any help would be appreciated.
>
> Shenan Stanley wrote:
> > Why are you trying to setup the defragmentation scheduled task
> > under a non-administrative account? Just set a scheduled task
> > under an administrative account - you don't have to be logged on to
> > run a scheduled defragmentation.
>
> GreyWolf wrote:
> > Ok then I was doing correctly. Logon with a local admin account
> > set the task up and even though it does not show up under a
> > non-admin account logon it still runs. Correct? The reason I am
> > stating this is I was told by a co-worker that I was wrong
>
> I don't know what you are using for your command line in the scheduled task,
> but I am assuming you are setting it up to run whether or not you are logged
> on and you are specifying the credentials and/or setting it up as SYSTEM.
>
> You can have it log the results (in a way):
>
> defrag %systemdrive% -f >> %systemdrive%\defrag.log
>
> If the above is your command line in the scheduled task (with credentials
> you manually set to an administrative level user and/or SYSTEM account...)
> then some time after it runs you should find the output of the command in
> the root of the system drive of the machine, starting with something like:
>
> "Windows Disk Defragmenter
> Copyright (c) 2001 Microsoft Corp. and Executive Software International,
> Inc.
>
> Analysis Report"
>
> The log file should quiet the co-worker and ease your fears of being
> incorrect.
>
> With a list of machines, adminstrative rights and a batch script you could
> setup the scheduled task pretty simply on all the machines you want
> remotely, as SYSTEM if you like. A little more effort (a share where
> everyone can write, etc) you could even have them logging to a central
> location. With a little more - heck - they could log it and email to you,
> everytime it ran, the resulting log file.
>
> --
> Shenan Stanley
> MS-MVP
> --
> How To Ask Questions The Smart Way
> http://www.catb.org/~esr/faqs/smart-questions.html
>
>
> .
>