dinsdag, november 07, 2006

VMware: Setting Regional settings for a template

An annoying thing while deploying a template in VirtualCenter is the fact that the regional settings are always defaulted to English-US. VirtualCenter uses the following files to run a sysprep on a template machine:
1) VMware VirtualCenter 2.0\scripts\gensysprepinf.vbs
2) VMware VirtualCenter 2.0\scripts\autoprep.wsf

These are the steps to follow (this example is for Belgium):
  • Make a backup of both files
  • Decrypt the files mentioned above. By default, they are encrypted
  • Edit gensysprepinf.vbs
    • find the following string:
      if mProductID <> "" then
      outStr = outStr _
      & " ProductID=" & mProductID & vbCrLf
      end if
    • add the following part AFTER the string just mentioned:
      outStr = outStr _
      &vbCrLf _
      &"[RegionalSettings]" & vbCrLf _
      &amp;" LanguageGroup=1" & vbCrLf _
      &" SystemLocale=00000813" & vbCrLf _
      &" UserLocale=00000813" & vbCrLf _
      &" InputLocale=0813:00000813" & vbCrLf
    • Save it in the appropriate directory (VMware VirtualCenter 2.0\scripts\gensysprepinf.vbs)

  • Edit autoprep.wsf

    • Find the string <script language="VBScript.Encode" src="gensysprepinf.vbs">
    • Alter the string to <script language="VBScript" src="gensysprepinf.vbs">
    • Save the file in the appropriate directory (VMware VirtualCenter 2.0\scripts\autoprep.wsf)
    • Done


You can generate your own country codes by downloading the sysprep tools from http://www.microsoft.com/downloads and running setupmgr.exe

5 opmerkingen:

Jase McCarty zei

Good post!

HoFKiCkS zei

It looks good, but how do you decrypt the original gensysprepinf.vbs?

Vincent Vlieghe zei

See my "Toolbox" section right

evilcraig zei

you have a typo in the line that reads:
&" LanguageGroup=1" & vbCrLf _

it should read:
&" LanguageGroup=1" & vbCrLf _

The amp; causes an "unexpected customization error"

evilcraig zei

oh, that's why, the html input form is going nutso.

In the page there is an "amp" with a semicolon in that line. This should be removed