Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


November 2001

Nonadministrative Win2K Defragmentation

RSS
Subscribe to Windows IT Pro | See More Storage Management Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

 See corrections to this article

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.

End of Article



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

Artak Babayan November 09, 2003


You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




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.
Top Viewed ArticlesView all articles
2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...


Related Events Disk-to-Disk Grows Up

Deep Dive into Windows Server 2008 R2 presented by John Savill

Data retention mandates. Volumes of critical aging data. What’s your IT plan?

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement