perl in BartPE: locale warning

  • Thread starter Ilya Zakharevich
  • Start date
I

Ilya Zakharevich

I cannot manage to build BartPE in a way which allows perl (AS flavor)
to run without warnings about (rephrasing):

setting locale failed
reverting to "C" locale

Somebody knowing a workaround? Some environment missing, or do I need
some more "language support" components?

Thanks,
Ilya

P.S. I'm getting similar warnings from some other Unixish projects
(e.g., Hugin)...
 
K

Keith R. Watson

I cannot manage to build BartPE in a way which allows perl (AS flavor)
to run without warnings about (rephrasing):

setting locale failed
reverting to "C" locale

Somebody knowing a workaround? Some environment missing, or do I need
some more "language support" components?

Thanks,
Ilya

P.S. I'm getting similar warnings from some other Unixish projects
(e.g., Hugin)...

Ilya,

BartPE by default does not have locale information. You can use the
following plugin to add locale information to Windows XP:

http://www.cc.gatech.edu/~krwatson/files/locale_defaults.zip

The locale settings in the plugin are for the United States. If you need
the settings for a different locale you will need to find a system
configured the way you want, capture the registry settings, and edit the
Locale_Defaults.inf file.

The settings in the [Default.AddReg] section come from
HKEY_CURRENT_USER\Control Panel\International


The settings in the [SetupReg.AddReg] section come from
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Nls


Use RegEdit to export the registry settings to a .reg file then use the
following web site to convert the settings to the BartPE .inf file format.

http://vb.nl.eu.org/homepage/reg2peinf.aspx


You can get help with the BartPE .inf file format here:

http://www.nu2.nu/pebuilder/help/english/pluginformat.htm


keith

--

Keith R. Watson Georgia Institute of Technology
Systems Support Specialist IV College of Computing
(e-mail address removed) 801 Atlantic Drive NW
(404) 385-7401 Atlanta, GA 30332-0280
 
I

Ilya Zakharevich

BartPE by default does not have locale information. You can use the
following plugin to add locale information to Windows XP:

http://www.cc.gatech.edu/~krwatson/files/locale_defaults.zip

A lot of thanks! I did not try it yet - I do not have BartPE-Builder
configured to run under BartPE yet, so would need to run real Windows
at some moment to rebuild...
The locale settings in the plugin are for the United States. If you need
the settings for a different locale you will need to find a system
configured the way you want, capture the registry settings, and edit the
Locale_Defaults.inf file.

The settings in the [Default.AddReg] section come from
HKEY_CURRENT_USER\Control Panel\International

The settings in the [SetupReg.AddReg] section come from
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Nls

Use RegEdit to export the registry settings to a .reg file then use the
following web site to convert the settings to the BartPE .inf file format.

Why? Cannot BartPE "just load the .reg" file at runtime?

And, btw, would not BartPE-builder be able to emit .reg for a certain
subtree automatically?

Yours,
Ilya
 
K

Keith R. Watson

BartPE by default does not have locale information. You can use the
following plugin to add locale information to Windows XP:

http://www.cc.gatech.edu/~krwatson/files/locale_defaults.zip

A lot of thanks! I did not try it yet - I do not have BartPE-Builder
configured to run under BartPE yet, so would need to run real Windows
at some moment to rebuild...
The locale settings in the plugin are for the United States. If you
need the settings for a different locale you will need to find a
system configured the way you want, capture the registry settings,
and edit the Locale_Defaults.inf file.

The settings in the [Default.AddReg] section come from
HKEY_CURRENT_USER\Control Panel\International

The settings in the [SetupReg.AddReg] section come from
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Nls

Use RegEdit to export the registry settings to a .reg file then use
the following web site to convert the settings to the BartPE .inf
file format.

Why? Cannot BartPE "just load the .reg" file at runtime?

During the Windows install process it ask several questions that tell it
how to set up locale. The BartPE utility builds a bootable Windows CD
using a Windows install CD and some external plugins, it doesn't actually
run the Windows installer so the locale questions never get asked.

You could try the following:

1. Put the .reg files on a USB flash drive.

2. Plug the flash drive into the machine

3. Boot the machine with the BartPE CD.

4. Import the .reg files

This would give the machine running the BartPE CD the locale registry
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.

The down side is you would always have use the USB flash drive to load
the .reg files every time you boot. If you use the plugin it adds the
registry keys to the BartPE image so they work every time without the
flash drive.
And, btw, would not BartPE-builder be able to emit .reg for a certain
subtree automatically?

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.

Yours,
Ilya


keith

--

Keith R. Watson Georgia Institute of Technology
Systems Support Specialist IV College of Computing
(e-mail address removed) 801 Atlantic Drive NW
(404) 385-7401 Atlanta, GA 30332-0280
 
I

Ilya Zakharevich

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

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?
 
K

Keith R. Watson

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


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.

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.

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
(e-mail address removed) 801 Atlantic Drive NW
(404) 385-7401 Atlanta, GA 30332-0280
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top