Sorry that didn't work either, but on a lighter note, I found something
that does work. I wrote a small program that asks the user if they want
to defrag before shutting down. "No" ends the program and the script is
never ran. Thank you for your help.
:
I forgot to add that when/if you want defrag c: -f to run, press any
key to continue.
--
Hope this helps. Let us know.
Wes
MS-MVP Windows Shell/User
In Wesley Vogel <
[email protected]> hunted and pecked:
You might try using pause on the first line.
pause
defrag c: -f
Pause suspends processing of a batch program and displays the message
Press any key to continue . . .
While the command window is open waiting for a key to be pressed it
can be closed with the Close [X].
--
Hope this helps. Let us know.
Wes
MS-MVP Windows Shell/User
In Phil Buzzette <
[email protected]> hunted and
pecked:
Thank you, but this didn't work. It just sits at the "Running Logoff
Scripts" until the defrag is done running. I also have these do
system backups in the logoff, but those come up with an interface
that it can be cancelled with. Any other ideas?
:
Try
cmd /k defrag c: -f
--
Hope this helps. Let us know.
Wes
MS-MVP Windows Shell/User
In Phil Buzzette <
[email protected]> hunted and
pecked:
I am looking for a way to incorporate an auto defrag into the
shutdown/logoff via group policy. The command line is:
defrag c: -f
(forces defrag of C:\)
My problem is that when I reboot or logoff, it takes forever. Now
this is not a problem at the end of the day, but during the day I
can't have it.
Is there a way to have the cmd window appear when the script runs
so that I can just close it out if I don't want it to run?