I hope this is the place for this but there are several places this could work.
OK, so, here is my code for you all to do with as you wish. I figure most all of you are better than me, so you'd probably already have this. As this little project was a learning experience for me, it is available to all.
Code:
'************************************************* ************************
'Script Name: VBSCleanup-Defrag-Shutdown.vbs
'Author:
'Created: 07/22/2008
'Description: This script automates the execution of the Windows Cleanup
' utility, defrag utility, and shutdown utility.
'************************************************* ************************
'Initialization Section
Option Explicit
Dim objWshShl
Set objWshShl = WScript.CreateObject("WScript.Shell")
'Main Processing Section
ExecuteCleanupUtility()
RunDefragUtility()
RunShutDownUtility()
WScript.Quit() 'Terminate the script's execution
'Procedure Section
Function ExecuteCleanupUtility() 'Run the Windows Disk Cleanup utility
objWshShl.Run "C:\WINDOWS\SYSTEM32\cleanmgr /sagerun:64",, True
End Function
Function RunDefragUtility() 'Run the defrage.exe command-line utility
objWshShl.Run "c:\Windows\System32\defrag C: -f -v",, True
End Function
Function RunShutDownUtility() 'Run the Shutdown command utility
objWshShl.Run "C:\Windows\System32\shutdown -f -t 30 -s"
End Function
Now, here's what I want to do with this.
I would like to see what you all can do with this. Modify it, change it, add to it, completely rearrange it, it is up to you.
I ask only two things:
1st - You post here what you do with it so we all can learn from your expertise.
2nd - You describe what the function is you are using and why you are using it.
I want to know what you are thinking, the functions you will be using, and how you expect them to work for you.
Please, anyone pitch in with this. If you modify it and it doesn't work, someone here may be able to help, after all, this is a learning experience. Thanks everyone.