From: Ben Morrow on 7 Jan 2010 20:30 Quoth Ilya Zakharevich <nospam-abuse(a)ilyaz.org>: > > My question was, in fact, more about "tools" than about the actually > used procedure. Are there command-line tools to emit the .reg file > for the given subtree of a running system? You can use regedit from the command line to do this. I can't remember the sytax but if it's not in the help (and IIRC it isn't as of WinXP) I'm sure Google can find it. > I see that you explicitly mention Perl in your plugin. It may be > simpler with Perl, right? Presumably once you know what the BartPE .inf format is it would be straightforward to write a Perl program to write such files straight from the running registry with Win32::TieRegistry. Ben
From: Keith R. Watson on 11 Jan 2010 09:11 Ilya Zakharevich <nospam-abuse(a)ilyaz.org> wrote in news:slrnhkctb7.bhv.nospam-abuse(a)powdermilk.math.berkeley.edu: > On 2010-01-06, Keith R. Watson <keith.watson(a)cc.gatech.edu> wrote: >>> Why? Cannot BartPE "just load the .reg" file at runtime? > >> You could try the following: > ... >> 3. Boot the machine with the BartPE CD. >> 4. Import the .reg files > > This is exactly the procedure I was asking about. So why did your > plugin goes in circles (via the main HIV of BartPE) instead of going > this itself (only, of course, automated)? > > This might add half-a-second to boot time, but would make > customization so much easier... > >> settings. However, I don't know if the locale settings take effect >> immediately or not. Some registry keys work as soon as you change >> them in the registry and others require telling the operating system >> to reload their settings from the registry. You could try it and see >> if it works. > > AHA! This might answer my question... Unfortunately, right now I do > not have a Windows machine at hand to export the .reg file (I would > use US)... > > On the other hand, switching users may switch the locale at runtime, > right? So it looks like this setting MUST have immediate effect. > >>> And, btw, would not BartPE-builder be able to emit .reg for a >>> certain subtree automatically? There are three possible scenarios when you make a registry change. 1. Processes that continually monitor for changes in the registry so when they are made with any tool, including the command line, the changes take effect immediately. 2. Processes that get their settings from the registry but never read them again unless they are told to. If you change the settings for one of these from the command line the settings will not take effect immediately. You have to make a Windows system call to tell the process to re-read its settings. Several of the control panel applets have this function built into them. If the use the control panel applet the change is immediate however, if you use a command line utility to modify the registry the changes will not take effect. If you know the system call that needs to be made it is possible to write a program that will do it for you from the command line. 3. Processes that get their settings from the registry but never read them again and there is no way to tell them to. When you change the registry settings for a process like this you have to reboot the system in order for them to take effect. > >> When you the BartPE utility runs it gets the Windows files from a >> Windows install CD and not from the machine the utility is running >> on. There are not registry keys on the Windows install CD for it to >> export. > > My question was, in fact, more about "tools" than about the actually > used procedure. Are there command-line tools to emit the .reg file > for the given subtree of a running system? There are several tools that will allow you to dump registry settings to a file and then import them into the registry. regdmp.exe regini.exe reg.exe regedit.exe regedit.exe is the one most people are familiar with. To export registry settings from "HKEY_CURRENT_USER\Control Panel\International" To the file foo.reg in Regedit v5 format use the following syntax: regedit.exe /e foo.reg "HKEY_CURRENT_USER\Control Panel\International" to export them in Regedit v4 format use the following syntax: regedit.exe /a /e foo.reg "HKEY_CURRENT_USER\Control Panel\International" To import the registry settings use the following syntax: regedit.exe foo.reg You will get several GUI prompts so if you want it to do it silently use the following syntax: regedit.exe /s foo.reg > > I see that you explicitly mention Perl in your plugin. It may be > simpler with Perl, right? > > Thanks again, > Ilya > > P.S. I have not googled for it yet, but maybe people here know right > away about installing keyboard layouts with BartPE? To do keyboard layouts you use the same process. You just have to know what keys in registry control they layout. Use this Google search windows registry keyboard layout keith -- Keith R. Watson Georgia Institute of Technology Systems Support Specialist IV College of Computing keith.watson(a)cc.gatech.edu 801 Atlantic Drive NW (404) 385-7401 Atlanta, GA 30332-0280
First
|
Prev
|
Pages: 1 2 Prev: Errors during PersistentPerl Compilation Next: passing argument to a subroutine |