There are some settings in the registry that can require a reboot before they take effect. Changing these settings in a Windows Sandbox and rebooting will not work since they will be reset when the sandbox starts up again. How can I run Windows 10 Sandbox with pre-configured registry keys?
3 Answers
You can achieve this by following the tutorial here. https://www.systanddeploy.com/2021/08/how-to-customize-default-windows.html
In a nutshell:
Mount the Windows Sandbox .vhdx.
Open regedit
Go to HKLM
Click on File
Click on Load hive
Browse E:\Files\Users\WDAGUtilityAccount\ntuser.dat
Type a name like 'test'
Change what you want
Click on File
Click on Unload hive
When you load the Sandbox, your reboot changes will be included.
-
1In the latest windows (version 22H2), There's no
BaseLayer.vhdx
in hereC:\ProgramData\Microsoft\Windows\Containers\BaseImages\GUID
. Need a workaround for this Nov 11, 2023 at 9:50
Sandbox goes away at every restart. That is the Sandbox design and I have not seen any changes to it. It is designed to be completely temporary.
If you need a degree of permanence, consider a virtual machine. Hyper-V should come with the machine you have if Sandbox is running.
Windows Sandbox does not persist beyond a reboot.
If you wish a persistent sandbox, use the free and open-source Sandboxie.
You should note that any changes to Windows that require a reboot are useless, since the reboot will boot the unmodified Windows. Whether the changes done in the sandbox will have any effect, this depends only on the nature of the changes, so the newly installed features may not be usable.