I need to do some mui test, and i need to change the language of the windows sandbox. The problem is that it's not possible to reboot or logout, as it will close and erase the sandbox. In the official documentation there's no mention of this: I wonder if there's a workaround to allow that, for example to modify the master image
3 Answers
It is possible to change many settings of the Windows Sandbox.
As Windows Sandbox is a virtual machine that is discarded when closed,
you should modify the base image of the virtual machine itself in its
.vhdx file.
See the article How to customize the default Windows Sandbox (files, folders, registry, wallpaper) without using WSB file.
In a nutshell :
- Mount the VHDX by
stopping the Windows system service "Container Manager Service",
and double-click on
BaseLayer.vhdxinC:\ProgramData\Microsoft\Windows\Containers\BaseImages\GUID - Modify the registry using
regeditmenu File > Load hive to load\Files\Users\WDAGUtilityAccount\ntuser.datand use File > Unload hive when finished.
For all language settings in the registry, see :
- Where in the registry is the language setting for each user stored?
- Windows 10 1809 - Region/language registry keys
- How to delete a keyboard layout in Windows 10
It would perhaps be simpler to setup your Windows to the wanted language and export the registry items of interest, then import these changes to the registry of the base image.
- 498,455
As @izogfif let me notice, it's now possible to reboot Windows Sandbox without losing data (but everything would be deleted when shut down)
DO NOT click on "sign out"
but manually reboot
it's now possible to have the different language
- 3,702
This is a PowerShell script that does the same:
powershell -Command Set-WinUILanguageOverride -Language en-US;Restart-Computer
Or if you wanna change keyboard, culture, etc
powershell -Command Set-WinUILanguageOverride -Language en-US; Set-WinUserLanguageList en-US -Force; Set-WinSystemLocale en-US; Set-Culture en-US; Restart-Computer
- 175



