Various useful scripts for use within Windows Sandbox
PowerShell scripts that can install apps or components not normally included in the Sandbox
Install-Winget.ps1: Fetches necessary files and dependencies from Microsoft's winget-cli repo, and installs itInstall-Microsoft-Store.ps1: Installs the Microsoft Store via the Windows Update APIs
Install VC Redist.ps1: Installs the latest Microsoft Visual C++ Redistributables, which are commonly required by other software.Set Theme Dark Mode.ps1 - Sets the Sandbox to Dark theme and also changes to a dark wallpaperSet Theme Light Mode.ps1 - Restores the Light theme. Doesn't currently change the wallpaper back though.This script runs within the Sandbox at launch and does a bunch of random registry tweaks to set up the Sandbox based on my own preference
Specifically:
.txt and .ps1 files to the Context Menu > "New" list.txt filesIt is written assuming it will be run from within the sandbox, so to automatically run it you'll need to put it into a mapped shared folder.
Create some new folder location (not in the sandbox) which you'll map into the sandbox. It doesn't matter what it's called or where it goes, but maybe something like C:\Users\WhateverUsername\MySharedSandboxFolder
In this repo I have the MyDefaultSandbox.wsb configuration file which is already set up to map the folder to the location the script expects. So in there you just need to update the <HostFolder> setting to use the path you selected in the previous step.
For Example:
<HostFolder>C:\Users\WhateverUsername\MySharedSandboxFolder</HostFolder>
Update any other options to your liking in the .wsb file, such as amount of RAM.
Launch Sandbox using the configuration by double clicking MyDefaultSandbox.wsb. It will map the folder to the Desktop as a folder called HostShared, and run the script automatically. You can also add other scripts and things to the shared folder you may want to run manually.
For other commands and registry tweaks that are more just personal preference, I've created a Wiki page