Jump to content

msconfig cleaning


Recommended Posts

Is is possible to automate to unchecking of items in the "Startup" tab of msconfig? I was thinking of a script to delete items in the two keys below that are no longer desired. The items that are checked to run at startup are listed in the two following registry keys:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run; and


any ideas on how to start would be greatly appreciated.

thanks in advance


Link to comment
Share on other sites

Hi Tarun

Thanks for the extremely fast reply. I think I need to expand on what I was looking for.

Environment: Small elementary school with 150 WinXP PCs in a Win2K3/AD environment. There are 6 to 12 items that I would like to uncheck on each PC in the msconfig/startup tab.

Solution desired: Run a .reg file (I was thinking at logon) to delete the desired items in the above keys if it can be done individually, if not possible individually, then delete entire key at the "run" folder and then re-populate with just desired/needed items with another .reg file at logoff or shutdown.

The .reg files can be obtained by exporting from above keys.

So I guess what I am looking for is: a way to run a .reg file to delete items at logon (can this be done in .reg format or does it need a script or .exe to run). Second piece is to repopulate at logoff or shutdown with .reg of only desired/needed items.

Hope this is clear enough - this is new turf for me.

thanks in advance

Link to comment
Share on other sites

Why delete it all? Something could go wrong (necessary entries not restored, missing some PCs during the "restore" phase, etc).

I see 2 main ways to do this:

-making a .reg file that will delete the usual useless/unwanted startup entries. Should be easy enough for HKLM entries. Simple and fast, but doesn't address the run entries under each HKCU...

-using a program or script that will iterate through each entry, comparing against the list of junk to remove (and do so if it matches), if no match, then compare against list of keepers (if matches, don't remove - you can arguably do this as a first step instead), and if still no match, why not show details and ask if it should be removed (and memorize what to do next time it sees it) - or plain leaving it alone if you prefer. It can parse each user's HKCU entries. Lists of good/bad entries are loaded in memory at startup, and updated lists are written once finished. Powerful and efficient, but far more complicated and time consuming (it's only a time saver if it takes you less time to write this than going across all PCs and doing it manually). You could run the script via logon script/GP or whatever, but you can also just spawn the process remotely using WMI.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...