Polecenia do instalacji programu SharpKeys bez pytań, do jego usuwania i do wykrywania w narzędziach wdrożeniowych. Polecenie jest podane tylko wtedy, gdy jest pewne: pochodzi z manifestu albo z udokumentowanych ustawień domyślnych technologii instalatora.
Powiązany poradnik: Parametry cichej instalacji: MSI, NSIS, Inno Setup · Odinstalowanie programu przez rejestr lub PowerShell
Przez winget
PowerShell
winget install --id RandyRants.SharpKeys -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id RandyRants.SharpKeys -e --silentwinget uninstall --id RandyRants.SharpKeys -e --silentWedług instalatora
64-bit · MSI · Bieżący użytkownik · en-US
Cicha instalacja
msiexec /i sharpkeys394.msi /qn /norestartZapis dziennika
msiexec /i sharpkeys394.msi /qn /norestart /l*v "%TEMP%\sharpkeys-install.log"Odinstalowanie
msiexec /x {0B9129DE-4A3E-46D2-9B0A-E9A4A9421B32} /qn /norestart- Kod produktu MSI
- {0B9129DE-4A3E-46D2-9B0A-E9A4A9421B32}
- Klucz odinstalowania w rejestrze
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0B9129DE-4A3E-46D2-9B0A-E9A4A9421B32}
PowerShell: pobierz, zweryfikuj, zainstaluj
Pobiera oficjalny plik, sprawdza jego SHA256 i instaluje go po cichu.
install-sharpkeys.ps1
$url = 'https://github.com/randyrants/sharpkeys/releases/download/v3.9.4/sharpkeys394.msi'
$sha256 = '059AD91921008299F76729F2D6EB0092EBAA11AE31B1871CA638C787544F8A07'
$file = Join-Path $env:TEMP 'sharpkeys394.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait