Discloud CLIを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Discloud.CLI -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Discloud.CLI -e --silentwinget uninstall --id Discloud.CLI -e --silentインストーラー別
64ビット · EXE(Inno Setup)
サイレントインストール
discloud-cli-x64-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-インストール先を指定
discloud-cli-x64-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\discloud-cli"ARM64 · EXE(Inno Setup)
サイレントインストール
discloud-cli-x64-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-インストール先を指定
discloud-cli-x64-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\discloud-cli"PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-discloud-cli.ps1
$url = 'https://github.com/discloud/cli-dart/releases/download/1.5.2/discloud-cli-x64-setup.exe'
$sha256 = '12FE777962F53282D3D4D231357905342BED45F6BA05DFDA36FA1AFFD0C91085'
$file = Join-Path $env:TEMP 'discloud-cli-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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-discloud-cli.ps1
$url = 'https://github.com/discloud/cli-dart/releases/download/1.5.2/discloud-cli-x64-setup.exe'
$sha256 = '12FE777962F53282D3D4D231357905342BED45F6BA05DFDA36FA1AFFD0C91085'
$file = Join-Path $env:TEMP 'discloud-cli-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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait