• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 971
  • Last Modified:

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?

Regards,

>>Rob:D<<
0
DrWarezz
Asked:
DrWarezz
  • 4
  • 3
  • 3
  • +1
1 Solution
 
K_2KCommented:
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,
2K
(\o/)
0
 
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.)

Regards,

>>Rob:D<<
0
 
juliancrawfordCommented:
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.
:)
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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...

Regards,

>>Rob:D<<
0
 
K_2KCommented:
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ยข,
2K
(\o/)
0
 
K_2KCommented:
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.

2K
(\o/)
0
 
ChrisDrakeCommented:
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?
0
 
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.

Regards,

>>Rob:D<<
0
 
ChrisDrakeCommented:
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.
0
 
K_2KCommented:
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.

Regards,
2K
(\o/)
0
 
ChrisDrakeCommented:
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!?
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now