Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > perl in BartPE: locale warning

Reply
Thread Tools

perl in BartPE: locale warning

 
 
Ilya Zakharevich
Guest
Posts: n/a
 
      01-04-2010
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)...
 
Reply With Quote
 
 
 
 
Keith R. Watson
Guest
Posts: n/a
 
      01-05-2010
Ilya Zakharevich <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> 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/f...e_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\Nl s


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/eng...uginformat.htm


keith

--

Keith R. Watson Georgia Institute of Technology
Systems Support Specialist IV College of Computing
http://www.velocityreviews.com/forums/(E-Mail Removed) 801 Atlantic Drive NW
(404) 385-7401 Atlanta, GA 30332-0280
 
Reply With Quote
 
 
 
 
Ilya Zakharevich
Guest
Posts: n/a
 
      01-05-2010
On 2010-01-05, Keith R. Watson <(E-Mail Removed)> wrote:
> 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/f...e_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\Nl s
>
> 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
 
Reply With Quote
 
Keith R. Watson
Guest
Posts: n/a
 
      01-06-2010
Ilya Zakharevich <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> On 2010-01-05, Keith R. Watson <(E-Mail Removed)> wrote:
>> 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/f...e_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\Nl s
>>
>> 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 Removed) 801 Atlantic Drive NW
(404) 385-7401 Atlanta, GA 30332-0280
 
Reply With Quote
 
Ilya Zakharevich
Guest
Posts: n/a
 
      01-07-2010
On 2010-01-06, Keith R. Watson <(E-Mail Removed)> 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?


> 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?
 
Reply With Quote
 
Keith R. Watson
Guest
Posts: n/a
 
      01-11-2010
Ilya Zakharevich <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> On 2010-01-06, Keith R. Watson <(E-Mail Removed)> 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
(E-Mail Removed) 801 Atlantic Drive NW
(404) 385-7401 Atlanta, GA 30332-0280
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
the relation between C++ locale and C locale zade C++ 1 03-05-2010 06:04 PM
Re: List of locale values for locale.setlocale() under Windows Gabriel Genellina Python 0 02-18-2009 12:00 AM
Create C++ std::locale without changing C locale dertopper@web.de C++ 4 08-26-2008 01:15 PM
i18n problem, involving Locale.getDisplayLanguage and Locale.getDisplayCountry Maurice Hulsman Java 1 07-25-2004 06:11 PM
locale.nl_langinfo(RADIXCHAR) vs locale.localeconv()['decimal_point'] Jeff Epler Python 2 08-31-2003 02:18 PM



Advertisments