PerryRaptor Posted June 3, 2006 Share Posted June 3, 2006 There isn't much to write about, no new concepts, tricks, or flashy GUI--This little script makes quick work of running Disk Clean Up, Disk Defragmenter, and SpybotSD sequentially. You can remote in to a server or workstation and start this script and it will do all the hard work for you. Also, you could use schtasks.exe and schedule it to run. ProgressOn("Automated System Maintenance", "running processes","0 percent", 555, 555) $pbar = 10 sleep(1000) ProgressSet( $pbar, $pbar & " percent" & @CRLF & @CRLF & @tab & "--> Process: Disk Clean Up") RunWait("CleanMgr.exe /sagerun: 777", "C:\WINDOWS") $pbar = 20 ProgressSet( $pbar, $pbar & " percent" & @CRLF & @CRLF & @tab & "--> Process: Defragmenting Boot Files") RunWait("Defrag c: -b", "C:\WINDOWS", @SW_HIDE ) $pbar = 30 ProgressSet( $pbar, $pbar & " percent" & @CRLF & @CRLF & @tab & "--> Process: Defragmenting C:\ Drive") RunWait("Defrag c: -f", "C:\WINDOWS", @SW_HIDE ) $pbar = 40 ProgressSet( $pbar, $pbar & " percent" & @CRLF & @CRLF & @tab & "--> Process: Defragmenting D:\ Drive") RunWait("Defrag d: -f", "C:\WINDOWS", @SW_HIDE ) $pbar = 60 ProgressSet( $pbar, $pbar & " percent" & @CRLF & @CRLF & @tab & "--> Process: SpyBot Search and Destroy") RunWait("C:\Progra~1\Spybot~1\Spybotsd.exe /minimize /autoupdate /autoimmunize /onlyspyware /autocheck /autofix /autoclose") $pbar = 100 ProgressSet( $pbar, $pbar & " percent" & @CRLF & @CRLF & @tab & "---------- ASM Complete ------------") Sleep(2250) ProgressOff() Note: the progress bar values were choosen based on the performance of a particular server and not the activity taking place. Link to comment Share on other sites More sharing options...
GrungeRocker Posted June 3, 2006 Share Posted June 3, 2006 There isn't much to write about, no new concepts, tricks, or flashy GUI--This little script makes quick work of running Disk Clean Up, Disk Defragmenter, and SpybotSD sequentially. You can remote in to a server or workstation and start this script and it will do all the hard work for you. Also, you could use schtasks.exe and schedule it to run. ProgressOn("Automated System Maintenance", "running processes","0 percent", 555, 555) $pbar = 10 sleep(1000) ProgressSet( $pbar, $pbar & " percent" & @CRLF & @CRLF & @tab & "--> Process: Disk Clean Up") RunWait("CleanMgr.exe /sagerun: 777", "C:\WINDOWS") $pbar = 20 ProgressSet( $pbar, $pbar & " percent" & @CRLF & @CRLF & @tab & "--> Process: Defragmenting Boot Files") RunWait("Defrag c: -b", "C:\WINDOWS", @SW_HIDE ) $pbar = 30 ProgressSet( $pbar, $pbar & " percent" & @CRLF & @CRLF & @tab & "--> Process: Defragmenting C:\ Drive") RunWait("Defrag c: -f", "C:\WINDOWS", @SW_HIDE ) $pbar = 40 ProgressSet( $pbar, $pbar & " percent" & @CRLF & @CRLF & @tab & "--> Process: Defragmenting D:\ Drive") RunWait("Defrag d: -f", "C:\WINDOWS", @SW_HIDE ) $pbar = 60 ProgressSet( $pbar, $pbar & " percent" & @CRLF & @CRLF & @tab & "--> Process: SpyBot Search and Destroy") RunWait("C:\Progra~1\Spybot~1\Spybotsd.exe /minimize /autoupdate /autoimmunize /onlyspyware /autocheck /autofix /autoclose") $pbar = 100 ProgressSet( $pbar, $pbar & " percent" & @CRLF & @CRLF & @tab & "---------- ASM Complete ------------") Sleep(2250) ProgressOff() Note: the progress bar values were choosen based on the performance of a particular server and not the activity taking place. must be made very better! there are people (like me) that haven't even a c: partition.... or the windows folder is not named WINDOWS! try using macros! [font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font] Link to comment Share on other sites More sharing options...
Wus Posted June 4, 2006 Share Posted June 4, 2006 well i dont think that was his concern since he was in a controlled server enviroment.. I'm sure you could could rewrite it with macros tho..... Link to comment Share on other sites More sharing options...
PerryRaptor Posted June 5, 2006 Author Share Posted June 5, 2006 It is just a scrap. I agree that macros would make it more universal--I just wanted to share the way to bundle up all of your server maintenance programs into one script. Link to comment Share on other sites More sharing options...
Valuater Posted June 5, 2006 Share Posted June 5, 2006 Thanks Perry.. SDimple clean and ( people can change it how they like ) you actually motivated me and i will be posting my version of this... i should have done months ago for my XPClean Menu 8) Link to comment Share on other sites More sharing options...
PerryRaptor Posted June 8, 2006 Author Share Posted June 8, 2006 Valuator, Your welcome and I look forward to your code. I spend most of my AutoIT time automating workstation and server maintenance, installing patches and security updates, and application installs. I've created a number of utility scripts that collectively take care of the entire domain. I would have never been able to achieve the results without AutoIT and PStools. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now