Kommandon för att installera OneLeft utan frågor, ta bort programmet igen och identifiera det i distributionsverktyg. Ett kommando visas bara när det är säkert: från manifestet eller som installationsteknikens dokumenterade standard.
Relaterad guide: Parametrar för tyst installation: MSI, NSIS, Inno · Avinstallera program via registret eller PowerShell
Med winget
PowerShell
winget install --id drscaon.OneLeft -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id drscaon.OneLeft -e --silentwinget uninstall --id drscaon.OneLeft -e --silentPer installationsfil
64-bitars · EXE (NSIS)
Tyst installation
OneLeft.Setup.2.0.0.exe /SEgen mapp
OneLeft.Setup.2.0.0.exe /S /D=C:\Apps\oneleftPowerShell: ladda ner, kontrollera, installera
Laddar ner den officiella filen, kontrollerar dess SHA256 och installerar tyst.
install-oneleft.ps1
$url = 'https://github.com/drscaon/electron-react-one-left-game/releases/download/v2.0.0/OneLeft.Setup.2.0.0.exe'
$sha256 = '10997BC294B37B74C005DE9B2C7C946B19AC30504648ADB6928399748AF6607F'
$file = Join-Path $env:TEMP 'OneLeft.Setup.2.0.0.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/S' -Wait