Re: Auto Defrag Script



oh no. I don't know how to write them that well. I am mid semester in a
begining programming course. I found mostly what I needed to do it online.

"Wesley Vogel" wrote:

Since you have the skills to write programs, why didn't you do that in the
first places.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In news:2A4B820A-EEA1-43A1-85EF-B104D8EFFA72@xxxxxxxxxxxxx,
Phil Buzzette <PhilBuzzette@xxxxxxxxxxxxxxxxxxxxxxxxx> hunted and pecked:
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.

"Wesley Vogel" wrote:

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 news:ulateDCsGHA.4116@xxxxxxxxxxxxxxxxxxxx,
Wesley Vogel <123WVogel955@xxxxxxxxxxx> 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 news:C3AAB700-5410-4E24-9DDD-AC45EF8E1820@xxxxxxxxxxxxx,
Phil Buzzette <PhilBuzzette@xxxxxxxxxxxxxxxxxxxxxxxxx> 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?

"Wesley Vogel" wrote:

Try

cmd /k defrag c: -f

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In news:734136B1-20EC-4BF4-B021-19D3D821F29D@xxxxxxxxxxxxx,
Phil Buzzette <PhilBuzzette@xxxxxxxxxxxxxxxxxxxxxxxxx> 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?


.



Relevant Pages

  • Re: Defrag wont run
    ... MS-MVP Windows Shell/User ... "Wesley Vogel" wrote: ... C:\Windows\Inf | Right click dfrg.inf | Select Install ... running for Defrag to work. ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: Auto Defrag Script
    ... I wrote a small program that asks the user if they want to defrag ... "No" ends the program and the script is never ran. ... MS-MVP Windows Shell/User ... Wesley Vogel hunted and pecked: ...
    (microsoft.public.windowsxp.security_admin)
  • Re: help in defragment window area
    ... "Wesley Vogel" wrote: ... This fix worked for me. ... MS-MVP Windows Shell/User ... The builtin defrag will fail to work, and if running defrag from the ...
    (microsoft.public.windowsxp.general)
  • Re: Defrag wont run
    ... "Wesley Vogel" wrote: ... C:\Windows\Inf | Right click dfrg.inf | Select Install ... MS-MVP Windows Shell/User ... running for Defrag to work. ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: SendTo Menu is SendTo
    ... Download the script fixsendto.vbs to your system and run it. ... MS-MVP Windows Shell/User ... Tommie hunted and pecked: ... Wesley Vogel wrote: ...
    (microsoft.public.windowsxp.basics)