Skip to content

Instantly share code, notes, and snippets.

@moisei
Last active March 28, 2020 01:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moisei/002f9e4b0883dbe9a44aec18c50e7368 to your computer and use it in GitHub Desktop.
Save moisei/002f9e4b0883dbe9a44aec18c50e7368 to your computer and use it in GitHub Desktop.
Windows sandbox
  • create folder C:\SandBoxShare
  • put both wsb and bat files there
  • edit batch file and add more desired packages to choco install line
  • doubleclick wsb and let's it be opened with WindowSandbox
  • it will start the sanbox and the bat file inside of the the sandbox
  • choco will install needed packages
  • note SandBoxShare on the desktop of virtual machine, it corresponds to the C:\SandBoxShare foldr of the host machine
  • wait for choco to finish all the installations
  • enjoy

https://www.howtogeek.com/411402/how-to-configure-the-windows-sandbox/ https://techcommunity.microsoft.com/t5/windows-kernel-internals/windows-sandbox/ba-p/301849

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
cinst -y googlechrome vscode
del "C:\Users\WDAGUtilityAccount\Desktop\Microsoft Edge.lnk"
pause
<Configuration>
<MappedFolders>
<MappedFolder>
<HostFolder>C:\SandBoxShare</HostFolder>
<ReadOnly>true</ReadOnly>
</MappedFolder>
</MappedFolders>
<LogonCommand>
<Command>C:\Users\WDAGUtilityAccount\Desktop\SandBoxShare\init-sandbox.bat</Command>
</LogonCommand>
</Configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment