CountrySwitch - First Logon Experience and language selector and an app starter for remote apps on network paths for AVD

First Logon Experience and language selector and an app starter for remote apps on network paths Link

Download Download the latest release from 05/11/2023

Select the language (users) Link

In some environments, customers are running Azure on Windows 10/11 with multiple language packs installed. After the first login, users have to choose their language to customize the environment - that is not so easy, while users have to open the language settings and select the language. The first steps are outside the user’s language and are not easy to do for everyone.

I built a tool that makes it easier for users to select their language by clicking on the right flag. Currently, the following features are available:

Feature regarding the language selection:

  • The tool shows the installed language packages by a flag of the countries.
  • A welcome message in the present language welcomes the users.
  • The user selects the language settings with a click on the flag.
  • Hovering the mouse over a flag shows the country and language name.
  • The app configures the language settings (and does one logoff to apply the setting).
  • The PowerShell script CountrySwitch-User.ps1 in the program files folder is started to do some optional customizing (language code is in $languageTag)

CountrySwitch is linked in all users’ start menu:

  • Startup: With parameter /RunOnce - Starts CountrySwitch at logon. The user will see the language selector only if the user is new and didn’t select a language once (HKCU:\SOFTWARE\ITProCloud\CountrySwitch\Completed is set to 1 )
  • Direct: Without parameters - Users can star CountrySwitch manually to select the language

Note on Remote Apps: Remote apps are ignoring the autostart folder. To have CountrySwitch enabled for remote app, please configure a local Startup script (local policy for users) with the following parameters: Name of script: “C:\Program Files\\CountrySwitch\CountrySwitch.exe” Parameters: /runonce

App Starter for remote apps Link

CountrySwitch can also start a local or an application on a file share (which normally does not work directly with AVD). Publish CountrySwitch as a remote app with the following parameters:

  • CountrySwitch.exe /remoteapp "<path to executable with parameters>" "<Working directory>"
  • CountrySwitch.exe /remoteapp "\\<path>\<share>\finance.exe /db=vm1" "\\<path>\<share>"

If a remote app is started with CountrySwitch, CountrySwitch first starts the PowerShell script CountrySwitch-App.ps1 in the program files folder to do some optional customization. The following parameters are set in the script:


$languageTag = "unknown",
$appCommandline = "\\<path>\<share>\finance.exe /db=vm1",
$appWorkingDir = "\\<path>\<share>",
$appParameter = "/db=vm1",
$appExecutable = "finance.exe"

The application starts after the PowerShell script finishes (CountrySwitch will run hidden and terminates after the start of the application (e.g., finance.exe).

Logging and configuration Link

CountrySwitch logs into %AppData%\ITProCloud

There are the following reg keys to optionally configure CountrySwitch:

HKLM:\SOFTWARE\Policies\ITProCloud\CountrySwitch (alls values are dword - 1 is true; 0 is false)

Key Value Default value
Enabled If false, the application will not show up (except for /remoteapp (App starter mode)) true
ExitOnRunOnceCompleted If the app is started with /runonce and the user has already completed the process, the application will not show up true
ExitOnSingleLanguage If only one language is installed, don’t show up
LogoffUserAfterSelectingNewLanguage logoff user after selecting a new language true
LogoffUserAfterSelectingSameLanguage Logoff user after selecting the same language as the user is still using false
RunUserScriptAfterSelectingLanguage Runs the ps script CountrySwitch-User.ps1 -languageTag {xx-YY} after the user selects a language true
DisableUserScriptForAppStarterMode If true, the app starter mode for a remote app will no longer trigger CountrySwitch-App before starting the application true

Release notes Link

Release Date Changes & Notes
1.1.3 2023-05-04 Initial
1.1.4 2023-05-10 Update: CountrySwitch-User.ps1 had a typo
1.1.7 2023-05-11 Fix: Avoid showing MSI installation screen for users if package unaccessible

Download Download the latest release from 05/11/2023

Please feel free to send me ideas for improvements.