ManagedDism icon indicating copy to clipboard operation
ManagedDism copied to clipboard

Question: /Gen-langINI

Open SymbioticKilla opened this issue 4 years ago • 5 comments

Hi,

is there a function for /Gen-langINI?

Thanks!

SymbioticKilla avatar Mar 30 '21 14:03 SymbioticKilla

I've found where this is implemented but its not in DISM the API, its only in dism.exe. At the moment the Microsoft.Dism library only covers what's defined in the public dismapi.h which are exported functions in dism.dll. I can't find a public API to call that will accomplish the functionality of /Gen-LangIni. Perhaps someone out there knows the API for it?

jeffkl avatar Mar 30 '21 16:03 jeffkl

@jeffkl Thank you for the answer! The thing is: after you add language packs you should create lang ini. If I call it separately with cmd it says "The specified image is currently being serviced by another DISM operation.". Can I reuse the session with cmd or inject this command somehow with your nuget?

SymbioticKilla avatar Mar 31 '21 14:03 SymbioticKilla

It is just a .ini file, it looks like the layout is well defined. You should be able to write it to the mounted image and commit it.

https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/wsim/add-multilingual-support-to-a-windows-distribution

[Available UI Languages]
en-US = 3
de-de = 0
fr-fr = 0

[Fallback Languages]
en-US = en-us

Maybe you could contribute it back to this library?

jeffkl avatar Mar 31 '21 19:03 jeffkl

Thanks! I will try my best. Do you know what do the numbers "en-US" = 3 mean?

SymbioticKilla avatar Apr 01 '21 07:04 SymbioticKilla

Yes here's what I found:

[Flags]
public enum LanguageStatus
{
    Available = 0,
    DefaultUI = 1,
    Installed = 2,
    Resolved = 4
}

So 3 means DefaultUI | Installed and 0 means its available but not installed.

jeffkl avatar Apr 01 '21 17:04 jeffkl