From 4b36048eaf809755ece5e91b4ec97aa4ddebf170 Mon Sep 17 00:00:00 2001 From: Klaus Frank Date: Fri, 10 Apr 2020 19:13:05 +0200 Subject: [PATCH] Persistent Work folder Make the work folder persistent --- Folding In Sandbox/install_folding_sandbox_on_host.ps1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Folding In Sandbox/install_folding_sandbox_on_host.ps1 b/Folding In Sandbox/install_folding_sandbox_on_host.ps1 index 649de0c..ee47e83 100644 --- a/Folding In Sandbox/install_folding_sandbox_on_host.ps1 +++ b/Folding In Sandbox/install_folding_sandbox_on_host.ps1 @@ -3,7 +3,8 @@ #For a custom username, add -username to the command execution param( [string]$username = 'wsandbox_anon', - [string]$team = '251561' + [string]$team = '251561', + [Switch]$has_no_persistent_work_dir ) $ProgressPreference = 'SilentlyContinue' #Progress bar makes things way slower @@ -51,6 +52,7 @@ If (!(test-path "$working_dir\$install_fname") -or (Get-ChildItem "$working_dir\ New-Item -ItemType Directory -Force -Path $working_dir | Out-Null Invoke-WebRequest -Uri $installer -OutFile "$working_dir\$install_fname" } +New-Item -ItemType Directory -Force -Path $working_dir\fah_working_dir | Out-Null # Create the FAH configuration file with the Windows Sandbox FAH team #251561. Write-Output 'Creating init command...' @@ -115,6 +117,12 @@ Set-Content -Path $sandbox_conf -Value @" $working_dir true +"@ + $(if ($has_no_persistent_work_dir) { @" + + $working_dir\fah_working_dir + false + +"@} else { "" }) + @" $wdg_install_dir\init.cmd