Changes

Jump to: navigation, search

Multi language

1,224 bytes added, 15:11, 18 November 2005
no edit summary
To use wpkg in an environment where there are machines with different languages i use the following script to start wpkg. It will start wpkg with /base arguement and insert the LCID (decimal) as subdir in the path [http://www.microsoft.com/globaldev/nlsweb/].
For each language i have a subdirectory with packages.xml, profiles.xml and hosts.xml.

<pre>
var wbemFlagReturnImmediately = 0x10;
var wbemFlagForwardOnly = 0x20;

var objWMIService = GetObject("winmgmts:\\\\.\\root\\CIMV2");
var colItems = objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem", "WQL",
wbemFlagReturnImmediately | wbemFlagForwardOnly);

var enumItems = new Enumerator(colItems);
for (; !enumItems.atEnd(); enumItems.moveNext()) {
var objItem = enumItems.item();

WScript.Echo("LangCode: " + objItem.OSLanguage);
WScript.Echo("Locale: " + objItem.Locale);
WScript.Echo();


var objShell = WScript.CreateObject("WScript.Shell");
var runString = "cscript \\\\Server\\wpkg\\wpkg.js /base:\\\\server\\wpkg\\" + objItem.OSLanguage + " \\\\ntinstall\\wpkg\\wpkg.js /synchronize";
WScript.Echo(runString);
objShell.Run(runString);

}
</pre>
Anonymous user

Navigation menu