perl in BartPE: locale warning

Discussion in 'Perl Misc' started by Ilya Zakharevich, Jan 4, 2010.

  1. 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 Zakharevich, Jan 4, 2010
    #1
    1. Advertising

  2. Ilya Zakharevich <> wrote in
    news::

    > 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
    801 Atlantic Drive NW
    (404) 385-7401 Atlanta, GA 30332-0280
    Keith R. Watson, Jan 5, 2010
    #2
    1. Advertising

  3. On 2010-01-05, Keith R. Watson <> 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/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
    Ilya Zakharevich, Jan 5, 2010
    #3
  4. Ilya Zakharevich <> wrote in
    news::

    > On 2010-01-05, Keith R. Watson <> 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/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
    801 Atlantic Drive NW
    (404) 385-7401 Atlanta, GA 30332-0280
    Keith R. Watson, Jan 6, 2010
    #4
  5. On 2010-01-06, Keith R. Watson <> 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?
    Ilya Zakharevich, Jan 7, 2010
    #5
  6. Ilya Zakharevich <> wrote in
    news::

    > On 2010-01-06, Keith R. Watson <> 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
    801 Atlantic Drive NW
    (404) 385-7401 Atlanta, GA 30332-0280
    Keith R. Watson, Jan 11, 2010
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Maurice Hulsman
    Replies:
    1
    Views:
    1,833
    Guus Bosman
    Jul 25, 2004
  2. Replies:
    4
    Views:
    998
  3. Gabriel Genellina
    Replies:
    0
    Views:
    691
    Gabriel Genellina
    Feb 18, 2009
  4. zade
    Replies:
    1
    Views:
    600
    James Kanze
    Mar 5, 2010
  5. Sibylle Koczian
    Replies:
    2
    Views:
    1,106
    Sibylle Koczian
    Nov 20, 2010
Loading...

Share This Page