Jump to content

[solved + source added] - Variable for the Windows Language ?


Recommended Posts

Posted (edited)

Hi,

Is there a way to get the Windows language into a variable ?

Here is the probleme:

When you run a MS Fix for example the name is "WindowsXP-KB918899-x86-ENU.exe". Almost all the file name is the same for all the languages available for this MSFix, except the language part.

So is there a possibility to transform/replace the language "ENU/FRA/...." and run the following command line:

WindowsXP-KB918899-x86-%OSLanguage%.exe

Maybe this feature already exists in the 5.3 version... but I did not see it quickly. So thanks you for your help.

Rgds,

David

Edited by ddicerto

Posted

Hi again,

Finally I spent some time to develop my "own" solution to performwhat I wanted to do.

So this message is also related to the WPI developers, if they want to implement this feature in the next release.

ATTENTION...

=========

As I am not a JScript developper, the source code may not be optimized. So please feel free to adapt it with something "better"... But at least it was working for my needs.

The goal was basically to allow me to use WPI to install the bundle of MSFix independently of the language of the OS. I wanted to have only one config.js and running all the MSFix by using the following command line:

"cmd1[pn]=['%wpipath%\\Install\\dotnetfx2-%OSLang%.exe']"

So I created a new script lang.js and added some function to manage the language code coming from the OS, and converted to a TLA (three letters acronyme), in the same way as the MSFix are downloaded for each languages. The main WPI.hta must be adapted to add the load of this file and initialize the language variable. Then the file generate.js must also be altered to include the replacment of the OSLanguage variable.

Right now in the lang.js, there is only 2 entries in the array containing the languages details. According the MS web site, there are a lot of different language codes that I did not add.

I hope this work will be usefull for another user so I publish it there. But again, I am not a JavaScript GOD, it is possible that the syntax is not correct.

Regards,

David.

WPI.zip

Posted

Hello,

Txs for your interrest and let me know your comment.

The reason I need more than one language (mainly french and english), is because when I go to some custumers, they have either french or english OS. So I wanted to have only one thing (one Setup) for all the languages.

David

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...