Windows Vista Forums

Launching defrag from script

  1. #1


    Aster Guest

    Launching defrag from script

    I want make volume defragging task a bit more handy, with vbscript or batch
    file (one volume, windows 98).
    To make the defrag work correctly, I firstly need set up a Clean boot
    configuration with MSCONFIG (select "Selective startup" and uncheck all
    boxes), then restart PC in Safe mode, and then run defrag command. How to
    implement these tasks into vbscript or batch file?




    Aster


      My System SpecsSystem Spec

  2. #2


    Pegasus [MVP] Guest

    Re: Launching defrag from script



    "Aster" <Aster@newsgroup> said this in news item
    news:ODUVE#ijKHA.4048@newsgroup

    > I want make volume defragging task a bit more handy, with vbscript or
    > batch file (one volume, windows 98).
    > To make the defrag work correctly, I firstly need set up a Clean boot
    > configuration with MSCONFIG (select "Selective startup" and uncheck all
    > boxes), then restart PC in Safe mode, and then run defrag command. How to
    > implement these tasks into vbscript or batch file?
    >
    > Aster
    I suggest you ask in a Win9x newsgroup how to defrag a disk with a console
    command. When you know the command then someone in this scripting group can
    tell you how to embed it in a script file.


      My System SpecsSystem Spec

  3. #3


    mr_unreliable Guest

    Re: Launching defrag from script

    Pegasus [MVP] wrote:

    > I suggest you ask in a Win9x newsgroup how to defrag a disk with a
    > console command. When you know the command then someone in this
    > scripting group can tell you how to embed it in a script file.
    the defrag command on win98 is:

    C:\WINDOWS\DEFRAG.EXE


    cheers, jw (a win98 holdout)
    ____________________________________________________________

    You got questions? WE GOT ANSWERS!!! ..(but, no guarantee
    the answers will be applicable to the questions)



      My System SpecsSystem Spec

  4. #4


    Pegasus [MVP] Guest

    Re: Launching defrag from script



    "mr_unreliable" <kindlyReplyToNewsgroup@newsgroup> said this in news item
    news:OsC4W6kjKHA.1648@newsgroup

    > Pegasus [MVP] wrote:

    >> I suggest you ask in a Win9x newsgroup how to defrag a disk with a
    >> console command. When you know the command then someone in this scripting
    >> group can tell you how to embed it in a script file.
    >
    > the defrag command on win98 is:
    >
    > C:\WINDOWS\DEFRAG.EXE
    >
    >
    > cheers, jw (a win98 holdout)
    Win98 holdout? Time warp?

    To the OP: This is really a Win98 OS question, not a scripting question.
    However, since I was naive enough to get involved, here are some
    suggestions. Write two batch files that perform the following tasks:

    File a)
    - Delete config.sys, autoexec.bat, system.ini, win.ini and the Startup
    folder.
    - Run msconfig.exe

    File b)
    - Restore config.sys, autoexec.bat, system.ini, win.ini and the Startup
    folder from a backup folder that you establish manually right at the
    beginning of this exercise.

    Invoke File a) for the defragging run and File b) after finishing the defrag
    operation.

    Note also that defragging your disk frequently may give you a warm feeling
    deep inside but it will have no measurable effect on your PC's performance.
    If you think otherwise then some tests with a stop watch might be an eye
    opener.


      My System SpecsSystem Spec

  5. #5


    Aster Guest

    Re: Launching defrag from script


    "Pegasus [MVP]" <news@newsgroup> wrote in message
    news:%23LTJxaljKHA.2780@newsgroup

    >
    >
    > "mr_unreliable" <kindlyReplyToNewsgroup@newsgroup> said this in news
    > item news:OsC4W6kjKHA.1648@newsgroup

    >> Pegasus [MVP] wrote:

    >>> I suggest you ask in a Win9x newsgroup how to defrag a disk with a
    >>> console command. When you know the command then someone in this
    >>> scripting group can tell you how to embed it in a script file.
    >>
    >> the defrag command on win98 is:
    >>
    >> C:\WINDOWS\DEFRAG.EXE
    >>
    >>
    >> cheers, jw (a win98 holdout)
    >
    > Win98 holdout? Time warp?
    >
    > To the OP: This is really a Win98 OS question, not a scripting question.
    > However, since I was naive enough to get involved, here are some
    > suggestions. Write two batch files that perform the following tasks:
    >
    > File a)
    > - Delete config.sys, autoexec.bat, system.ini, win.ini and the Startup
    > folder.
    > - Run msconfig.exe
    >
    > File b)
    > - Restore config.sys, autoexec.bat, system.ini, win.ini and the Startup
    > folder from a backup folder that you establish manually right at the
    > beginning of this exercise.
    >
    > Invoke File a) for the defragging run and File b) after finishing the
    > defrag operation.
    >
    > Note also that defragging your disk frequently may give you a warm feeling
    > deep inside but it will have no measurable effect on your PC's
    > performance. If you think otherwise then some tests with a stop watch
    > might be an eye opener.
    ---------------------


    One note: according to microsoft, the volume must have at least 15 percent
    free space for Defrag to completely and adequately defragment it. Defrag
    uses
    this space as a sorting area for file fragments. If a volume has less than
    15 percent free space, Defrag only partially defragments it.

    So, if my 20Gb hard drive has only 1.53Gb free space and I have performed
    defrag, my volume has been defragmented only partially ?



      My System SpecsSystem Spec

  6. #6


    Pegasus [MVP] Guest

    Re: Launching defrag from script



    "Aster" <Aster@newsgroup> said this in news item
    news:ekKCafsjKHA.5524@newsgroup

    >
    > "Pegasus [MVP]" <news@newsgroup> wrote in message
    > news:%23LTJxaljKHA.2780@newsgroup

    >>
    >>
    >> "mr_unreliable" <kindlyReplyToNewsgroup@newsgroup> said this in news
    >> item news:OsC4W6kjKHA.1648@newsgroup

    >>> Pegasus [MVP] wrote:
    >>>> I suggest you ask in a Win9x newsgroup how to defrag a disk with a
    >>>> console command. When you know the command then someone in this
    >>>> scripting group can tell you how to embed it in a script file.
    >>>
    >>> the defrag command on win98 is:
    >>>
    >>> C:\WINDOWS\DEFRAG.EXE
    >>>
    >>>
    >>> cheers, jw (a win98 holdout)
    >>
    >> Win98 holdout? Time warp?
    >>
    >> To the OP: This is really a Win98 OS question, not a scripting question.
    >> However, since I was naive enough to get involved, here are some
    >> suggestions. Write two batch files that perform the following tasks:
    >>
    >> File a)
    >> - Delete config.sys, autoexec.bat, system.ini, win.ini and the Startup
    >> folder.
    >> - Run msconfig.exe
    >>
    >> File b)
    >> - Restore config.sys, autoexec.bat, system.ini, win.ini and the Startup
    >> folder from a backup folder that you establish manually right at the
    >> beginning of this exercise.
    >>
    >> Invoke File a) for the defragging run and File b) after finishing the
    >> defrag operation.
    >>
    >> Note also that defragging your disk frequently may give you a warm
    >> feeling deep inside but it will have no measurable effect on your PC's
    >> performance. If you think otherwise then some tests with a stop watch
    >> might be an eye opener.
    > ---------------------
    >
    >
    > One note: according to microsoft, the volume must have at least 15 percent
    > free space for Defrag to completely and adequately defragment it. Defrag
    > uses
    > this space as a sorting area for file fragments. If a volume has less than
    > 15 percent free space, Defrag only partially defragments it.
    >
    > So, if my 20Gb hard drive has only 1.53Gb free space and I have performed
    > defrag, my volume has been defragmented only partially ?
    >
    This is another question that has nothing whatsoever to do with scripting.
    Please post it in a Win9x newsgroup.


      My System SpecsSystem Spec

  7. #7


    mr_unreliable Guest

    Another comment from the other side of the time warp

    Pegasus [MVP] wrote:

    > I suggest you ask in a Win9x newsgroup how to defrag a disk with a
    > console command.
    Back in the win98 era, many of those who wanted to keep
    their PC systems operating efficiently would purchase
    a copy of the "Norton Utilities" (back then Peter Norton
    actually had a hand in writing the code, as opposed to
    Mr Symantec).

    One of the Norton Utilities was called "Speed Disk".
    That was because Norton was so arrogant that he believed
    he could do better than simply "defragging" a hard drive.
    Yes, "Speed Disk" did defrag the drive, but it also
    _optimized_ the drive -- allegedly organizing the files
    so your system would run faster. Whether or not my
    system actually did run faster I couldn't tell, but it
    was a noble thought. And the Norton "Speed Disk" utility
    certainly had a better presentation, and many more options
    than the ms (standard system utility) defrag.exe.

    As to the requirement to have some spare empty disk
    space to allow for the defragger to work, I would say
    that is an absolute requirement. If the OP has no
    free space (or not enough) I suggest offloading some
    of the files to a big flash drive, if you shop around
    you should be able to find an 8gb flash drive for
    $22-24. And after the defragging is done, flash drives
    have many other uses.

    cheers, jw
    ____________________________________________________________

    You got questions? WE GOT ANSWERS!!! ..(but, no guarantee
    the answers will be applicable to the questions)

      My System SpecsSystem Spec

Launching defrag from script

Similar Threads
Thread Thread Starter Forum Replies Last Post
launching/not launching programs upon logging in John Goche Vista General 2 18 Sep 2009
Script: Scheduled task to defrag machines paulreims VB Script 1 05 Aug 2008
Vista Game Launching Script techie007 Gaming 1 12 Jan 2008
Vista Game Launching Script (VGL.vbs) techie007 Vista Games 0 12 Jan 2008
O&O Defrag versus Microsoft Defrag in Vista =?Utf-8?B?TUJATUksIFVTQQ==?= Vista performance & maintenance 12 05 Oct 2006