Optimize the Windows XP/Vista Registry Regularly Using NTREGOPT
NTREGOPT is a registry optimization tool for Windows NT/2000/2003/XP/Vista. This program compacts the registry to the minimum size possible by removing any slack space that may be left after installing or uninstalling applications in the system. Note that this program does not modify the registry contents in any way.
Registry optimization as a scheduled task
NTREGOPT can be run in silent mode using the /silent parameter, and can be run as a Scheduled Task. Here are the instructions.
Important: You should restart the system immediately because any changes made to the registry after NTREGOPT has been run are lost after the reboot. The user is supposed to close all running applications before continuing the registry optimization process. In this case, we’re going to launch NTREGOPT using a VBScript so that the user is cautioned about a system restart that’ll take place after optimization is complete.
Also, do not run NTREGOPT when updates (from Windows Update) are pending to be installed, or when a reboot is already pending.
Follow these preliminary steps first:
- Download and install NTREGOPT if it’s not already installed.
- Download ntregopt.zip and save to Desktop. Extract the file ntregopt.vbs (which is the launcher script) to a permanent folder. This is the file we’re going to run using Task Scheduler.
Instructions for Windows Vista
1. Open Task Scheduler from Control Panel or by running the command control schedtasks from Start, Search box.
2. In the Actions pane on the right, click Create Taskā¦

3. Type a name for the task that you want to create (e.g. NTREGOPT), and optionally assign a description.

4. Enable the option Run with highest privileges. This is an important step.
5. Select the Triggers tab, and click New
6. In the New Trigger window, configure the settings as desired (say, Weekly), and click OK

7. Select the Action tab, and click New
8. In the Program/script: text box, mention the full path to NTREGOPT.VBS (e.g. "D:\Scripts\NTREGOPT.VBS")

10. Click OK, OK.
You’ve now created a new task to run registry optimization once in a week. When the Task runs, you’ll see message windows as shown below.

11. At this point, save your work and close all running applications before clicking Yes.

12. Click OK to start the registry optimization task.
Instructions for Windows XP (*Service Pack 2 and higher*)
1. Open Schedule Tasks. To do so, click Start, Run and type control schedtasks
2. Double-click Add Scheduled Task
3. In the Scheduled Task Wizard dialog, click Next
4. Click Browse…
5. Locate the ntregopt.vbs file, and click OK
6. Mention a name for the task, and select Weekly and click Next

7. Select the time and day when you want this task to run, and click Next

8. In the next screen, type the administrative account name and password.
9. Select the Open advanced properties for this task when I click Finish checkbox
10. Click Finish
11. Enable the Run only if logged on option, and click OK.
Note: The registry optimization task requires administrative credentials. You have to log on to the computer by using administrative credentials for the task to run.
NTREGOPT switches - from Readme.txt
If you plan to run NTREGOPT using a shortcut, here are the command-line parameters that you would like to know. Simply running NTREGOPT.EXE without any switches, will work as well.
Description of the command line switches:
| Switch | Description |
| silent | Puts NTREGOPT into "silent" mode. |
| /noprogresswindow | Hides the progress window during optimization. |
| /reboot | Automatically reboots the computer when optimization of the registry is complete. |
Copyright © 2008 Ramesh Srinivasan. All rights reserved.
RELATED POSTS
- Transfer Registry Editor Favorites to Another Computer
- Add “Go to Registry Key” To the Right-Click Menu in Internet Explorer
- How to Backup the Message Rules, Safe Senders and Block Senders List in Windows Mail
- Configure Windows Vista Screensaver Settings via the Registry
- How to Disable the Splash Screen in Windows Mail
- Change the Open Folder Icon in Windows Explorer and Registry Editor
- Preserve the Order of Internet Explorer Favorites When Transferring to Another PC
- Search… Context Menu Option Removed in Vista Service Pack 1
- Edit the Information Displayed in the “Type” Column of Details View in Folders
- Folder Options Missing From Tools Menu in Windows Explorer


Like this site? Make sure you
September 2nd, 2008 at 8:43 am
Thanks alots.