cerw1n Posted December 11, 2003 Posted December 11, 2003 I have always been annoyed by the fact that Power users cannot defrag there own computers. We did not have it in our budget to purchase a defrag solution for our users either. I looked into so many different tricks that would allow the users to defrag there own hard drive or for us to schedule defrags on there hard drives and in the end none of them would work. With Autoit I created a way for a power user to defrag there own hard drive. Basically it is a combination of autoit installed, the Morpheus defrag utility, and repackaged into a MSI file. When it deploys VIA group policy it puts a icon in there start menu. When they run it defrag automatically analyzes and defrags the hard drive. For this to work we have the same local administrator password on all machines, since auto IT is actually temp using the local admin password to run defrag.
blinkdt Posted December 12, 2003 Posted December 12, 2003 @shareef59I hope this doesn't sound like I'm avoiding your request for help, but my best advice is to spend a good bit of time with the AutoIt Help File, particularly the Script Commands section. The help file is the only comprehensive tutorial available, as far as I know.You'll also find excellent solutions to nettlesome problems like the one cerw1n described by searching Google. Some pretty talented IT people use this little proggy for odds and ends jobs.In my case, I copy a compiled AutoIt script to the Administrator's startup folder during the Windows Update process, when I'm fiddling with other shortcuts changes, etc. At startup following reboot, the configuration file launches after a 10 second delay (user input is blocked during this period) and the tweaking begins. For example:IfWinExist, PsShutdown, The system is shutting down, Goto, QuitnowBlockInput, onSleep, 10000BlockInput, offMsgBox, 36, Attention!, Configure this PC?IfMsgBox, YES, Goto, next1IfMsgBox, NO, Goto, next2next1:SplashTextOn, 290, 110, Installation in Progress, Configuring the Task Bar and Start Menu...Sleep, 2000SplashTextOffRightClick, 600, 750Sleep, 300Send, rWinWaitActive, Taskbar and Start Menu PropertiesSend, !hSleep, 500Send, {TAB}Sleep, 500Send, {ENTER}SplashTextOn, 290, 110, Installation in Progress, Configuring TweakUI Powertoy...Sleep, 2000SplashTextOff;adjust TweakUIRun, tweakuiWinWaitActive, Tweak UI, Tweak UI for WindowsSleep, 1000Send, {DOWN}Sleep, 500;General settingsSend, {TAB}Sleep, 500Send, {SPACE}Sleep, 500Send, {DOWN}Sleep, 500Send, {SPACE}Sleep, 500Send, {DOWN 2}Sleep, 500Send, {SPACE}Sleep, 500Send, {DOWN}Sleep, 500Send, {SPACE}Sleep, 500Send, {DOWN}Sleep, 500Send, {SPACE}Sleep, 500Send, {DOWN}Sleep, 500Send, {SPACE}Sleep, 500Send, {DOWN}Sleep, 500Send, {SPACE}Sleep, 500Send, {DOWN}Sleep, 500Send, {SPACE}Sleep, 500Send, {DOWN}Sleep, 500Send, {SPACE}Sleep, 500Send, {DOWN}Sleep, 500Send, {SPACE}Sleep, 500Send, {DOWN}Sleep, 500Send, {SPACE}Sleep, 500Send, {TAB 4}Sleep, 500Send, {DOWN}Sleep, 500Send, {DOWN}Sleep, 500;Explorer settingsSend, {TAB}Sleep, 500Send, {DOWN 6}Sleep, 500Send, {SPACE}Sleep, 500Send, {TAB 4}Sleep, 500Send, {RIGHT}Sleep, 500Send, {DOWN}Sleep, 500Send, !NSleep, 500Send, {TAB 4}Sleep, 500Send, {UP}Sleep, 500Send, {LEFT}Sleep, 500Send, {DOWN}Sleep, 500;Common Dialogs settingsSend, {TAB}Sleep, 500Send, {SPACE}Sleep, 500Send, {TAB 4}Sleep, 500Send, {DOWN}Sleep, 500Send, {DOWN}Sleep, 500;Desktop settingsSend, {TAB}Sleep, 500Send, {SPACE}Sleep, 500Send, {DOWN}Sleep, 500Send, {DOWN}Sleep, 500Send, {SPACE}Sleep, 500Send, {TAB 4}Sleep, 500Send, {DOWN}Sleep, 500;My Computer settingsSend, {TAB}Sleep, 500Send, {SPACE}Sleep, 500Send, {TAB 4}Sleep, 500Send, {DOWN}Sleep, 500;Control Panel settingsSend, {DOWN}Sleep, 500;Templates settingsSend, {DOWN}Sleep, 500;Internet Explorer settingsSend, {TAB}Sleep, 500Send, {DOWN}Sleep, 500Send, {SPACE}Sleep, 500Send, {TAB 4}Sleep, 500Send, {DOWN}Sleep, 500;Command Prompt settingsSend, {DOWN}Sleep, 500;Logon settingsSend, {TAB}Sleep, 500Send, {DOWN}Sleep, 500Send, {DOWN}Sleep, 500Send, {SPACE}Sleep, 500Send, {TAB}Sleep, 500Send, {ENTER}WinClose, Tweak UI....That's where I better end, unless someone says it's OK to post 476 lines! My IT pals chuckle when they see me working with this, but they're always peeking over my shoulder with interest. And again, the process described above goes on to complete a few operations that, well, I wouldn't know how to begin to accomplish using any other method. For example, how would you give a user the option to install Intellipoint post-unattended? I ask point-blank whether they want to install it, and if the answer is affirmative, another script runs and installs it, cleaning everything up afterward. This is not something that a non-programmer newbie (like me) is going to tackle on a weekend but it's worth a close look. Check it out.
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