Skip navigation

Nonadministrative Win2K Defragmentation

Downloads
22360.zip

One of Windows 2000's most convenient features is the built-in Disk Defragmenter software, which is a scaled-down version of Executive Software's Diskeeper. However, a drawback of Win2K's Disk Defragmenter is that you need Administrator rights to run the software. The program is useful for administrators defragmenting their Win2K servers' hard disks, but it isn't useful for nonadministrative Win2K Professional users.

Several workarounds exist for this problem, including using the Scheduler or the Runas command. However, these solutions have drawbacks. When you use the Scheduler, you can run Disk Defragmenter only at an Administrator-specified time. When you use the Runas command, you can't enter a password on the command line.

I came up with a solution that combines HiddenSoft's free AutoIt 2.6 utility (available at http://www.hiddensoft.com), which lets you automate keystrokes and mouse movements, with the Runas command. My network has a standard local administrator password for all Win2K Pro PCs. Only the IT staff knows this password. Thus, I created the AutoIt script in Listing 1.

To disguise your local administrator password, you can use AutoIt's Convert Script to Exe option to compile the AutoIt script into an executable. Then, copy the executable to your Win2K Pro systems. You can put a shortcut to this executable on a Win2K Pro system's All Users Start menu. For additional authenticity, you can also change the icon to use the Disk Defragmenter icon in the \%systemroot%\system32\shell32.dll file. You can then teach some of your users to defragment their hard disks to improve performance.

Corrections to this Article:
  • Please note that in the downloadable listing, the second to last line should be read: Run, C:\\WINNT\\System32\\runas.exe /user:%computername%\\Administrator "c:\\WINNT\\system32\\mmc.exe C:\\winnt\\system32\\dfrg.msc" This text should appear all on one line without any line break. We apologize for any inconvenience this might have caused.
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish