Registered member login:
Register Now
Altirigos » Altiris Administrators » General » scandisk and/or defrag

» Current Poll
Do you leave the Aclient enabled?
YES - 83.05%
196 Votes
NO - 16.95%
40 Votes
Total Votes: 236
You may not vote on this poll.
» Stats
Members: 9,948
Threads: 12,158
Posts: 56,984
Top Poster: Nick (4,991)
Welcome our newest member, rmerrill
» Online Users: 33
0 members and 33 guests
No Members online
Most users online at once 294, 06-30-2007 at 12:24 PM.
» July 2010
S M T W T F S
27282930 1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Reply
Old 07-11-2006, 10:50 AM   #1 (permalink)
 
Status: Junior Altiris Admin
Join Date: 02-23-2006
Location: Texas
Age: 54
Posts: 25


scandisk and/or defrag

I'd like to create a job to wake up a computer, run scandisk and/or defrag, and then shut back down. Is this possible?
marzipan is offline   Reply With Quote
Old 07-11-2006, 10:52 AM   #2 (permalink)
 
Nick's Avatar
 
Status: Altiris Architect (Site Founder)
Join Date: 01-01-2005
Location: RDU, North Carolina, USA
Posts: 4,991


Wake up is the easy part.

The scandisk/defrag part can be done with a script on certain versions of Windows. I think the ability started with one of the flavors of XP.
__________________
Scire potentia est (knowledge is power)
Nick is offline   Reply With Quote
Old 07-11-2006, 11:03 AM   #3 (permalink)
 
Status: Junior Altiris Admin
Join Date: 02-23-2006
Location: Texas
Age: 54
Posts: 25


scandisk and/or defrag

Thanks for responding so quickly! The computers have XP pro on them. I was thinking it would be a script. I've only made one other in the past, but I will give it a try.
marzipan is offline   Reply With Quote
Old 07-11-2006, 11:04 AM   #4 (permalink)
 
jpkishere's Avatar
 
Status: Altiris Engineer (Super Mod)
Join Date: 02-17-2005
Location: RDU, North Carolina, USA
Age: 35
Posts: 379


Quote:
Originally Posted by Nick
Wake up is the easy part.

The scandisk/defrag part can be done with a script on certain versions of Windows. I think the ability started with one of the flavors of XP.
With XPs defrag you can use command line options to automatically defrag (defrag /?)

With Windows 2000, do a google search for autodefrag, it is freeware that is floating around.. (if you can't find it, I can probably dig up a URL or upload the file)..

I would think for scandisk, you could do a chkdsk /? and find out what you can run on them..
__________________
jpkishere
jpkishere @ gmail.com
jpkishere is offline   Reply With Quote
Old 07-11-2006, 11:06 AM   #5 (permalink)
 
jpkishere's Avatar
 
Status: Altiris Engineer (Super Mod)
Join Date: 02-17-2005
Location: RDU, North Carolina, USA
Age: 35
Posts: 379


Quote:
Originally Posted by marzipan
Thanks for responding so quickly! The computers have XP pro on them. I was thinking it would be a script. I've only made one other in the past, but I will give it a try.
You could just do a quick batch file that was like:

chkdsk /f
defrag /f

and that would be it.. I think.. =)
__________________
jpkishere
jpkishere @ gmail.com
jpkishere is offline   Reply With Quote
Old 07-11-2006, 11:25 AM   #6 (permalink)
 
carymon's Avatar
 
Status: Super Altiris Admin
Join Date: 11-28-2005
Location: Mississippi, USA
Posts: 309


and if you want to turn the machine off again add a..

shutdown -s -f -t 00


--------
On a side note... If you wish to batch the whole project, providing the NIC has been flashed I've had success using Free Wake-On-Lan from the command line. (It of course is far easier with Altiris though. )

http://www.matcode.com/wol.htm

Last edited by carymon; 07-11-2006 at 11:37 AM..
carymon is offline   Reply With Quote
Old 07-11-2006, 11:36 AM   #7 (permalink)
 
Nick's Avatar
 
Status: Altiris Architect (Site Founder)
Join Date: 01-01-2005
Location: RDU, North Carolina, USA
Posts: 4,991


Autodefrag info can be found HERE.

Here is a vbscript to defrag XP systems.

Code:
'defrag_all.vbs - Defrags all hard disks - Can be run as a Scheduled Task
'© Doug Knox - 3/29/2002

Set WshShell = WScript.CreateObject("WScript.Shell")

   Dim fso, d, dc
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set dc = fso.Drives
   For Each d in dc
      If d.DriveType = 2 Then
    Return = WshShell.Run("defrag " & d & " -f", 1, TRUE)
      End If
   Next

Set WshShell = Nothing
__________________
Scire potentia est (knowledge is power)
Nick is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -4. The time now is 05:51 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
vB.Sponsors
Altirigos