Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

WinXP Tips

How to DEFRAG a drive if not an Administrator by dbMark
Posted: 17 Nov 04 (Edited 18 Nov 04)

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.

Back to Microsoft: Windows FAQ Index
Back to Microsoft: Windows Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close