|
|
||
|---|---|---|
| General Scripts | ||
| Installer Scripts | ||
| Sandbox Configurations | ||
| Startup Scripts | ||
| LICENSE | ||
| README.md | ||
README.md
Scripts & Tools for Windows Sandbox
Various useful scripts for use within Windows Sandbox
📥 Installer Scripts
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- Unlike other similar scripts, mine does NOT use any third party APIs like UUP Dump or RG-Adguard at all
- (All web requests go directly to Microsoft servers. Even those fetching the download URLs in the first place)
Install VC Redist.ps1: Installs the latest Microsoft Visual C++ Redistributables, which are commonly required by other software.
🛠️ General Scripts
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.
🕑 SandboxStartup.ps1 (Startup Script)
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:
- Enables the old context menu
- Enables Explorer settings: Show hidden files, Show file extensions
- Adds "Open PowerShell Here" and "Open CMD Here" options to the context menu
- Adds
.txtand.ps1files to the Context Menu > "New" list - Sets PowerShell execution policy to allow running scripts, and also makes them runnable by double clicking
- If you put Notepad or Notepad++ into the shared host folder (described in next section), it will add context menu options to Edit files with them, and set them as default editor for
.txtfiles - Finally restarts Explorer to apply any changes and opens the shared host folder
How to Use SandboxStartup.ps1
It 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.wsbconfiguration 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
.wsbfile, 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 calledHostShared, and run the script automatically. You can also add other scripts and things to the shared folder you may want to run manually.
More Personal Preference Tweaks For Your Startup Script
For other commands and registry tweaks that are more just personal preference, I've created a Wiki page