NetsGoを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id zsio.NetsGo -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id zsio.NetsGo -e --silentwinget uninstall --id zsio.NetsGo -e --silentインストーラー別
64ビット · EXE(NSIS) · 現在のユーザー
サイレントインストール
NetsGo_0.1.8_windows_x64-setup.exe /Sインストール先を指定
NetsGo_0.1.8_windows_x64-setup.exe /S /D=C:\Apps\netsgo- アンインストール用レジストリキー
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NetsGo
64ビット · MSI · すべてのユーザー
サイレントインストール
msiexec /i NetsGo_0.1.8_windows_x64_en-US.msi /qn /norestartログを出力
msiexec /i NetsGo_0.1.8_windows_x64_en-US.msi /qn /norestart /l*v "%TEMP%\netsgo-install.log"アンインストール
msiexec /x {7CAB780B-65AB-41D0-8870-A0C6D47AD2B8} /qn /norestart- MSIプロダクトコード
- {7CAB780B-65AB-41D0-8870-A0C6D47AD2B8}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7CAB780B-65AB-41D0-8870-A0C6D47AD2B8}
- UpgradeCode
- {846F9F1B-106E-5F64-AB51-9461337CFE0F}
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-netsgo.ps1
$url = 'https://github.com/zsio/netsgo/releases/download/v0.1.8/NetsGo_0.1.8_windows_x64-setup.exe'
$sha256 = '77D61E877B4E22F8089B3F495315987C4F1E039A7B66CB3348A1396EE1484FB4'
$file = Join-Path $env:TEMP 'NetsGo_0.1.8_windows_x64-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 '/S' -Wait install-netsgo.ps1
$url = 'https://github.com/zsio/netsgo/releases/download/v0.1.8/NetsGo_0.1.8_windows_x64_en-US.msi'
$sha256 = 'AD5BA7FA7081E0860079E1259BF2561999FF283EE7A1CCF48B7A9BE686FAB865'
$file = Join-Path $env:TEMP 'NetsGo_0.1.8_windows_x64_en-US.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