Registry Refresh...?

hey all,
I am hoping that it is possible to reload the registry settings via a batch file (or atleast uploading a few alterations) without having to reboot?

For example:
with the registry editing software, FreshUI, there are many alterations you can make to the registry (which make system changes), many of these changes take affect instantly, without you having to reboot.
Is this possible to do via a batch file?

As, I can make an alteration to the registry easily via a batch file, but have to reboot before it does anything! :(

Does anyone know how to solve my problem?


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

reg.exe is on XP, or free download from MS.  Use this to read how it works:

reg /?
reg query /?
reg add /?

Much Carefullness is strongly advized.

Good Luck,
DrWarezzAuthor Commented:
hey K_2K (& any one else),

Thanks, but I already know how to alter the registry via Batch/DOS.

My problem is:
After I make an alteration, I must reboot the computer for it to take affect. Is it possible to have a registry alteration take affect to the system without having to reboot?
(e.g: a command or something, which reloads the registry to the OS... [without a reboot])

(I hope I've rephrased it a bit better.)


I have heard of one possible solution to this issue.
After the changes have been made to the registry if you stop and restart explorer.exe the registry changes will take affect.
If you can get your batch file to kill explorer.exe and the launch explorer.exe you could have a fix.
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

DrWarezzAuthor Commented:
hey Julian,
your solution works, thanks.

The only problem now is:
stopping and then restarting explorer.exe via a batch!?

I'm sure tht:
start c:\windows\explorer.exe
will restart it.

But, stopping it is another story. Also: by stopping explorer.exe, would this end the batch file which is supposed to restart it?

Thanks so far...


All changes done in the registry are instant, regardless of using regedit, regedt32, reg, or regini.

They all save changes to "the hives" the same way.  If you make a change in regedit that instantly makes a difference, the same change from batch instantly makes a difference.

As Julian correctly points out, some programs choose to set some values when they start and not check those in the registry again.  In those cases a utility like FreshUI or the one you are building needs to both do the registry change AND restart the programs that use it.  tlist.exe and kill.exe, both free from MS downloads can help with that.

Other settings can be prooven instant without restarting any program.
This is fun, (and usefull):
Right-click the start button and tap the x key a few times.  The menu items that x is a shortcut for are alternately highlighted.  (Some older systems don't have "Explore all users", so the x will instead immediately open explorer at the start menu)  You almost have to look to see which one is lit before you can press enter to make it happen, no big deal.
Now click "Start", "Run", paste the following line in, and press enter.  
     reg add "HKEY_CLASSES_ROOT\Folder\shell\explore" /ve /d "Explore&-"
Now when you right-click the start button, the - key immediately explores your start menu, and the x key immediately explores the "all users" start menu.  No more looking needed, mouse optional. [Start] [Esc] [Shift+F10] [-]

For those looking on who don't have reg.exe, the same above works in regedit, navigating to [HKEY_CLASSES_ROOT\Folder\shell\explore] and setting the default value to "Explore&-" (without the quotes).  You can see the change before you close the registry, the instant you click "ok" for that value.

So now we know why MS takes SO LOONNG to open that tiny little right-click "context menu".  It re-reads a large portion of registry every time we ask it to draw that thing.  The second time we open it, it still reads it all, but unchanged blocks of the hive are in memory cache, so it's faster.

My 2¢,

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
But, stopping it is another story. Also: by stopping explorer.exe, would this end the batch file which is supposed to restart it?

No,  Explorer started cmd.exe to control the batch, and does not keep track of it as a child process.

I do not think this is possible.

It depends on the particulare code that is using the registry values as to how it handles the change of those values.  Most things should work OK if you shut down the program in question, change the registry, then re-start the program.

Services are probably different - they load their settings when they start, and they don't bother to check the registry again while running, so unless you use their own interfaces to change things, they are never going to notice?
DrWarezzAuthor Commented:
Hey K_2K, Chris and Julian,

Thanks for all your input. I see that there isn't much luck for me to do what I originally wanted, but it doesnt' matter. Thanks alot anyway.


It should be relatively easy to find a program which can kill explorer.exe for you: so if you have a look around for this thing, you will probably have your answer?

From a programming point of view - it's only half a dozen lines of code to find and restart it, so something this trivial must already exist someplace.
kill -f  Explorer.EXE  

But I,m guessing his problem is more related to restricted area of the registry or a setting his adminsitrator has not authorized his userid to make.

Ahh - so thats how you do that.

He *did* say this earlier tho (wrt killing explorer):-

>hey Julian,
>your solution works, thanks.
>The only problem now is:
>stopping and then restarting explorer.exe via a batch!?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.