How to run a script to automatically start defrag

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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?
 

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?
 
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.
 
Joined
Aug 7, 2007
Messages
9,028
Duplicate to http://forums.techguy.org/software-development/919475-how-write-script-run-defrag.html

 

Triple6

Rob
Moderator
Joined
Dec 26, 2002
Messages
52,933
Please don' post more then one thread for the same question, I've merged your two threads together here.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Staff online

Top