Securely donate CPU time with Windows Sandbox
Published Apr 06 2020 12:11 PM 19.6K Views
Microsoft

With Windows Sandbox, you can run any win32 desktop application you wish with a pristine configuration every time you start it. It allows you to do virtually whatever you want within a secure isolated desktop environment without requiring any cleanup after the fact.

 

For example, Windows Sandbox allows you to contribute time on your Windows 10 PC towards fighting COVID-19. Here is how it works: using Windows Sandbox you can run the open-source Folding@Home app to help simulate protein dynamics. Folding@Home is one of the most popular distributed computing projects bringing together citizen scientists who volunteer to run simulations of protein dynamics on their personal computers to fight COVID-19 and other diseases. For more information about the project itself, please visit the Folding@Home Knowledge Base.

 

Folding@Home in Windows SandboxFolding@Home in Windows Sandbox

 

To do this we have provided a simple PowerShell script that automatically downloads the latest Folding@Home client and launches it in Windows Sandbox. If Windows sandbox is not enabled on your system, the script will enable the feature and reboot your system. After the reboot, just launch the script again and it will start Windows sandbox to run the Folding@Home client. The PowerShell script can be downloaded from our GitHub repository here.

 

PowerShell scriptPowerShell script

 

How to Get Involved  

 

We have also created a GitHub open-source repository to store this script and allow you to submit your own ideas for running applications in Windows Sandbox.

 

Have a suggestion for Windows Sandbox or encountering issues ? We welcome your feedback, which can be submitted through feedback hub here.

 

Cheers,

Brandon Smith, Margarit Chenchev, Paul Bozzay, Hari Pulapaka, Judy Liu & Erick Smith

9 Comments
Copper Contributor

The argument '.\install_folding_sandbox_on_host.ps1' to the -File parameter does not exist. Provide the path to an existing '.ps1' file as an argument to the -File parameter.

Microsoft

@TempleOfFive Thanks for trying it out! Please make sure you're running the given command in the same directory as the powershell script. 

Copper Contributor

Thanks brandon, missed the part where i had to download the ps script first.  thx

Thanks for Sharing with the Community ! I published this post on social media

Copper Contributor

There is a bit of a problem for me. The script says something about a system file which cannot be found which is mentioned at line 119, which is the path to WindowsSandbox or the path to the configuration file. But when I try to start sandbox manually from the Powershell it tells me that C:\WINDOWS\system32\WindowsSandbox.exe does not exist. The installation file for FAH however has noticed that I have WindowsSandbox installed. And I have also checked, there is a WindowsSandbox.exe file located at C:\WINDOWS\system32. What should I do?

Copper Contributor

Sandbox Windows 10 Entreprise asks for an activation key. Should I ignore this message in the info center?

Microsoft

@oak2paper I'm not exactly sure what could be causing this issue for you, but it's possible it's something to do with your system path or powershell configuration. Regardless, it seems like the script gets far enough to generate the configuration files and FAH installer, so you should just be able to double-click on the Windows Sandbox configuration file to get things running.

Microsoft

@tempora_mutantur110 This is actually a known issue, so you can ignore that message and use Sandbox as you normally would. This will be fixed in a future update.

Copper Contributor

Hi,

while running the powershell script above I received this error message:

"Invoke-WebRequest : The remote server returned an error: (404) Not found
In C:\Windows\System32\install_folding_sandbox_on_host.ps1:33 Zeichen:19
+ ... ller_size =(Invoke-WebRequest $installer -Method Head -UseBasicParsin ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand" ....

I suspect the error is related to the release of the latest version "fah-installer-7.6.9.exe" on April 17.

Well... I downloaded the new version manually and started it in the Windows Sandbox.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Update:
I just noticed that a new version of the script was released and the bug was fixed. Everything works now. Thanks.

Version history
Last update:
‎Dec 12 2022 11:08 AM
Updated by: