Commands for installing gtk-sharp 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
By installer
Any CPU · MSI
Silent install
msiexec /i gtk-sharp-2.12.45.msi /qn /norestartWrite a log
msiexec /i gtk-sharp-2.12.45.msi /qn /norestart /l*v "%TEMP%\gtk-sharp-install.log"PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-gtk-sharp.ps1
$url = 'https://github.com/mono/gtk-sharp/releases/download/2.12.45/gtk-sharp-2.12.45.msi'
$sha256 = 'C944A52CA16D4C10F4619D4D7C9A46B358FFA798FA35641FC05030E59983E03D'
$file = Join-Path $env:TEMP 'gtk-sharp-2.12.45.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