Blog |Follow Nick on Twitter| About

My work laptop is a Vista machine, a random conversation came up the day about fragmenting (Defraging) the hard drive; since switching to linux at home "pc maintenance" hasn't really been on my mind, I know that vista does "stuff" in the background and internal IT install a heap of "stuff" that runs in the background that generally slows things down.

The guys in the office recommended that I should run JKDefrag to help "optimize" things. I downloaded a copy, and read that you have a variety of options to run the software including a screen-saver; my laptop is on pretty much most of the time so I've decided that I would run JkDefrag as a scheduled task over night.

I've not scheduled anything on Vista before and in my investigation I found that vista by default at 1am every wednesday defrags the hard drive! :cool:

This changed my plan, instead of scheduling JkDefrag to run, I would replace the default defrag task.

If you would like to do the same, download a copy of JkDefrag and unzip it into a directory, take a note of where you unzip the files as you'll need the directory path later.

To get started open the vista task scheduler (it's in admin tools). From the tree in the left browse to:

Task Scheduler Library -> Microsoft -> Windows -> Defrag

Next download the XML file attached to this post (Nicks Scheduled Defrag) and within the Task scheduler, click on "Import Task" from the action bar on the right hand side... browse to and choose my file, once done right click the old "Scheduled Defrag" task and disable it, you should end up looking at a window like this...

Vista Task

Cool! You're nearly there, the task you've installed is a copy of the default defrag task, with the date and action changed to suit my need, you will need to do the same! You remember you wrote down a directory path earlier, well you need it now....

My scheduled task runs Jkdefrag from a directory called C:\Users\nick.bettison\Software\JkDefrag-3.36\, I'm 99% sure you won't have that directory ;)

Right click on NicksScheduledDefrag and select properties , click the actions tab, select "start a program" and click edit. Change the path C:\Users\nick.bettison\Software to where ever you have your JkDefrag, you will need to make changes in both the "Program / Script" field, and "Add arguments field"...

Edit Vista

When done, click Ok. If you feel like it you can change when it runs under the "triggers" tab, edit the "weekly" trigger to suit your needs.

You can now choose to wait (until 1am saturday night - or whatever you changed it to), or click run; either way after the task has run in your JkDefrag-3.36 directory you will hopefully have log.txt showing the results of the defrag! :cool:



Nick Bettison ©