Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to DEFRAG a drive if not an Administrator

WinXP Tips

How to DEFRAG a drive if not an Administrator

by  dbMark  Posted    (Edited  )
Periodically you may want to force Windows XP to defragment the hard drive. One example of this is immediately after you update XP to a new Service Pack (the complete XP2 download is well over 200 MBs and it makes lots of changes) or your computer seems to run slow or take longer to boot.

But what do you do if the usual user does not log on with Administrator privileges? Normally to run DeFrag you could go to Windows Explorer, right click on the C: drive, open Properties, go to the Tools tab and select Defragmentation but you need administrator rights. (Error-Checking or ScanDisk may need only a scheduling and reboot.)

Here is a way to create a shortcut on the desktop that the Power User can run anytime as long as the first time it is run you enter the administrator password so that permission can be saved:

RunAs.exe /savecred /user:administrator "defrag c: -v"

If still slow, try running the core of the MS bootvis utility. The file placement optimization, which is done no more often than once every three days, is an example of a task that is carried out when the system is deemed to be idle. To start this 10-15 minute optimization routine:

RunAs.exe /savecred /user:administrator "Rundll32.exe advapi32.dll,ProcessIdleTasks"

For similar and more comprehensive speed enhancements see faq779-4784.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top