diff --git a/Startup Scripts/SandboxStartup.ps1 b/Startup Scripts/SandboxStartup.ps1 index aa0e7ae..607a257 100644 --- a/Startup Scripts/SandboxStartup.ps1 +++ b/Startup Scripts/SandboxStartup.ps1 @@ -5,7 +5,10 @@ param( [switch]$launchingSandbox ) -#Set-PSDebug -Trace 1 +# Set to $true to enable debug tracing of the script. +$debugTrace = $false + +if ($debugTrace) { Set-PSDebug -Trace 1 } # ------ Check that we're running in the Windows Sandbox ------ # This script is intended to be run from within the Windows Sandbox. We'll do a rudamentary check for if the current user is named "WDAGUtilityAccount" @@ -17,7 +20,7 @@ if ($env:USERNAME -ne "WDAGUtilityAccount") { } # Change context menu to old style -reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve +reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve # Show file extensions reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f @@ -142,3 +145,5 @@ if ($launchingSandbox) { Start-Process explorer.exe C:\Users\WDAGUtilityAccount\ # Uncomment to pause after running #Read-Host "Pause" +# If set to trace debug by uncommenting "Set-PSDebug -Trace 1" above, pause at the end so you can see the debug output +if ($debugTrace) { Read-Host "Debug trace complete, press Enter to exit." }