Commands for installing Sleep Timer without prompts, removing it again and detecting it from deployment tools. A command is shown only when it is certain: from the manifest or the installer technology’s documented default.
Related guide: Silent install switches: MSI, NSIS, Inno Setup · Uninstall a program with the registry or PowerShell
With winget
PowerShell
winget install --id feliskio.sleep-timer -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id feliskio.sleep-timer -e --silentwinget uninstall --id feliskio.sleep-timer -e --silentBy installer
64-bit · EXE (NSIS)
Silent install
Sleep.Timer.Setup.1.2.0.exe /SCustom folder
Sleep.Timer.Setup.1.2.0.exe /S /D=C:\Apps\sleep-timerPowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-sleep-timer.ps1
$url = 'https://github.com/feliskio/sleep-timer/releases/download/v1.2.0/Sleep.Timer.Setup.1.2.0.exe'
$sha256 = '25DFD84D507E89A53B139C4A737D30A034619DFE2C8795CD162FC776D173E3A2'
$file = Join-Path $env:TEMP 'Sleep.Timer.Setup.1.2.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