Using the windows XP command line version of the built-in defragmentation utility,
it is possible to right-click a drive in "My computer", and choose Defrag.
A command line window will appear and that drive will be defragmented.
When it’s complete, the window just disappears.
To achieve this, create a new file named context_defrag.inf in Notepad
and place the following text inside:
; context_defrag.INF
; Adds Defrag to the right click context menu in Windows XP
[version]
signature="$CHICAGO$"
[DefaultInstall]
AddReg=AddMe
[AddMe]
HKCR,"Drive\Shell\Defrag\command",,,"DEFRAG.EXE %1"
Then, right-click the new INF file and choose Install.
Alternatively you can use the script context_defrag.vbs
to achieve similar results.
Note: To avoid accidental running of the script, the scripts on this web server
are stored as *.vb_ file. Clicking on the link will bring up the script in the browser.
From there you can save it for later use, simply by selecting All text in the browser window and
copy/pasting it into your own newly created .vbs script file.
You can also automate defragmenting your drives with the build-in Defrag support
and a scheduled job.
|