Jump to content
Sign in to follow this  
Fyzzle

Defragging Drives

Recommended Posts

Fyzzle

I'm setting up some scripts for family members to automate some of their more mundane tasks.

This is what I have for the related functions:

Func defrag()
ShellExecuteWait("C:\Program Files\Defraggler\Defraggler.exe","c:\")
EndFunc

And also

Func defragcnfg()
ShellExecuteWait('schtasks.exe','/create /SC DAILY /TN fragme /TR "\"C:\Program Files\Defraggler\Defraggler.exe"c:\" /ST 00:15:00 /RU SYSTEM')
EndFunc

What i'd like to do is have an input asking which drives they would like defragged, then both functions reference the output to run now, and schedule. Anyone have any recommendations? I'm fairly new to autoit, and I did quite a bit of searching but I may have overlooked something awesome.

Share this post


Link to post
Share on other sites
whim

Look up 'DriveGetDrive' in the help file

cheers,

whim

Share this post


Link to post
Share on other sites
Fyzzle

Look up 'DriveGetDrive' in the help file

cheers,

whim

Brilliant, thanks :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×