araxth
Posts: 2
Joined: Wed Feb 03, 2021 7:37 pm

custom actions depending on the language

Thu Feb 04, 2021 10:19 am

Hello Devs and Community,

I have a quick question, hopefully there will be a solution for this matter.

Long story made short, I have a few PC games to be published on MS Store. That means MSIX or APPX. I have only the masters, localized already in English and German without an existing installer. These being said, I want to make sure the default language of these titles once installed will be either EN (should the recipient PC have EN or non-German localized Windows ) or German (for the customers running the game on German localized Windows OS). The switch is made by changing the values of a couple of custom registries which i had configured in the installer already.

Knowing that the installer is able already to detect the environment language when running, i wonder if there's an option to create custom rules for the registry keys written, based on the environment language or a language switch picked by the customer.


On Inno I can handle that via scripting but then again Inno cannot handle MSIX and Advanced Installer can :)

Thank you in advance for your insights.

Best regards
Nicolae

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: custom actions depending on the language

Wed Feb 10, 2021 3:31 pm

Hello Nicolae and welcome to our forums,
The switch is made by changing the values of a couple of custom registries which i had configured in the installer already.
If I understand this correctly, it is your applicaiton (the executable itself, not the setup) that reads the registry keys and decides what language to use.

The registry you put inside an MSIX package are only visible to your app, not for the rest of the apps or the OS. With this in mind, I believe we can use this approach since it is your app that needs to read the registries.

I believe an approach could be creating the registry key twice and conditioning its' component based on the "ProductLanguage" property.

GotoComponent.png
GotoComponent.png (54.81KiB)Viewed 2267 times
Condition.png
Condition.png (50.61KiB)Viewed 2267 times

If you want to follow a custom approach, you can try to have a look over the following articles:

- MSIX Custom Scripts

- Custom Actions in MSIX vs. MSI vs. App-V Scripting - A quick comparison

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

araxth
Posts: 2
Joined: Wed Feb 03, 2021 7:37 pm

Re: custom actions depending on the language

Thu Mar 04, 2021 12:15 pm

Hi Catalin,

many thanks for your extended feedback. I'll dig into this solution and if I figure something i will confirm it in this thread.

Good day

Best regards,
Nicolae.

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: custom actions depending on the language

Thu Mar 04, 2021 5:46 pm

You are always welcome, Nicolae!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”