microsoft / Windows-Sandbox

Disposable, secure and lightweight Windows Desktop Environment
https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-sandbox/windows-sandbox-overview
MIT License
364 stars 49 forks source link

New version 7.6 of fah-installer doesn't create valid URL for download #24

Closed StrangelyPerfect closed 4 years ago

StrangelyPerfect commented 4 years ago

Today's version, at https://download.foldingathome.org/releases/public/release/fah-installer/windows-10-32bit/ at https://download.foldingathome.org/releases/public/release/fah-installer/windows-10-32bit/v7.6/ isn't parsed correctly. It creates 7.5999999 or similar on my two machines.

I have modified my local version at Line 43 to include a Rounding to 1d.p.: $version = ((Invoke-WebRequest -Uri $installerurl -UseBasicParsing).Links | Where-Object {$.href -match '^v\d+([.]\d+)?'} | ForEach-Object {[math]::Round([float]($_.href -replace '[^.\d]', ''),1)} | Measure-Object -Max).Maximum

...which works, but it seems a bit of a kludge to me.

le0b commented 4 years ago

Similar problem here: When I run 'install_folding_sandbox_on_host.ps1' I get the following error:

Checking for latest version of foldingathome... Invoke-WebRequest : The remote server returned an error: (404) Not Found. At C:\Temp\install_folding_sandbox_on_host.ps1:48 char:19


    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Using FAH v7.59999990463257...

...Invoke-WebRequest : 404 Not Found
nginx/1.14.2
At C:\Temp\install_folding_sandbox_on_host.ps1:59 char:2
+     Invoke-WebRequest -Uri $installer -OutFile "$working_dir\$install ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
brasmith-ms commented 4 years ago

Thank you for pointing this out, just started seeing this myself. I'll get a patch in!

brasmith-ms commented 4 years ago

Okay should work now, not sure why I had the float type conversion in there...

Let me know if you're still hitting issues

le0b commented 4 years ago

Yep, that fixed it for me, thank you!