Kommandon för att installera NClass 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 BalazsTihanyi.NClass -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id BalazsTihanyi.NClass -e --silentwinget uninstall --id BalazsTihanyi.NClass -e --silentPer installationsfil
32-bitars · EXE (Inno Setup)
Tyst installation
NClass_v2.04_setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Egen mapp
NClass_v2.04_setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\nclass"PowerShell: ladda ner, kontrollera, installera
Laddar ner den officiella filen, kontrollerar dess SHA256 och installerar tyst.
install-nclass.ps1
$url = 'https://downloads.sourceforge.net/nclass/NClass_v2.04_setup.exe'
$sha256 = 'C7B7B445AA1440698DE97270E0934606EC4550577AFF54C27E8B0D1A14BC0E52'
$file = Join-Path $env:TEMP 'NClass_v2.04_setup.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait