October 17, 2001 05:17 PM

Nonadministrative Win2K Defragmentation

Rating: (0)
Windows IT Pro
InstantDoc ID #22360

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.

ARTICLE TOOLS

Add a Comment

Tank you for important information.
It is good for big win networks.

Artak Babayan 11/9/2003 8:32:18 AM


You must log on before posting a comment.

Are you a new visitor? Register Here
Free Power Tools Brochure
Get Mark Minasi's 17-page guide today!



      

advertisement

GOOGLE LINKS
SPONSORED LINKS
FEATURED LINKS

White Papers

Your remote offices contain valuable electronic data – are they adequately protected? Learn how proven technologies can reliably and cost-effectively back up a branch office from a central location, in real time, to disk or tape, and even utilize existing backup solutions.

Downloads

PacketTrap IT is a comprehensive and affordable network management and application monitoring solution that solves problems associated with bandwidth, network and application performance, and connectivity. Gain insight into your network - try PacketTrapIT free for 21 days!

Web Seminars

IT administrators have to solve a myriad of problems. This web seminar outlines the ten most common systems management pains - including managing highly distributed systems and dealing with data theft/loss – and the best practices to address each.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.