1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

How to run a script to automatically start defrag

Discussion in 'Windows XP' started by valley_girl1919, Apr 26, 2010.

Thread Status:
Not open for further replies.
Advertisement
  1. valley_girl1919

    valley_girl1919 Thread Starter

    Joined:
    Aug 9, 2009
    Messages:
    44
    OK, I am new at a lot of this and one of my first projects is to work on making sure all 60 workstations at work are defraged monthly. I have never wrote a script for anything, but heard I can write a script to automatically run defrag on all the work stations. I know i can set defrag to run in task scheduler but i dont want to have to go to each workstation to do this if I dont have to. We have active directory at work and there are group policies. My question is how do I write a script to run defrag automatically without the user being logged in and me having to set it up on each workstation?
     
  2. valley_girl1919

    valley_girl1919 Thread Starter

    Joined:
    Aug 9, 2009
    Messages:
    44
    OK, I am new at a lot of this and one of my first projects is to work on making sure all 60 workstations at work are defraged monthly. I have never wrote a script for anything, but heard I can write a script to automatically run defrag on all the work stations. I know i can set defrag to run in task scheduler but i dont want to have to go to each workstation to do this if I dont have to. We have active directory at work and there are group policies. My question is how do I write a script to run defrag automatically without the user being logged in and me having to set it up on each workstation?
     
  3. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,786
  4. Callum_Dawson

    Callum_Dawson

    Joined:
    Mar 9, 2009
    Messages:
    560
    A batch file would probably suite best;

    Code:
    @echo off
    dfrgui
    That opens Disk Defragmenter, but I'm not entirely sure if there are any arguments to start the initial de-fragmenting.
     
  5. TheOutcaste

    TheOutcaste

    Joined:
    Aug 7, 2007
    Messages:
    9,028
    Duplicate to http://forums.techguy.org/software-development/919475-how-write-script-run-defrag.html

     
  6. Triple6

    Triple6 Moderator

    Joined:
    Dec 26, 2002
    Messages:
    52,935
    First Name:
    Rob
    Please don' post more then one thread for the same question, I've merged your two threads together here.
     
  7. TuringEnigma

    TuringEnigma

    Joined:
    Apr 29, 2010
    Messages:
    5
    1. Go to www.google.com
    2. In the search box type "schedule defrag"
    3. Next press enter
    4. Click on any of the links returned to discover how to do this simple task
     
  8. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - script automatically start
  1. zbo907
    Replies:
    1
    Views:
    509
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/919478

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice