Codespaceを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id TristanEdwards.Codespace -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id TristanEdwards.Codespace -e --silentwinget uninstall --id TristanEdwards.Codespace -e --silentインストーラー別
64ビット · EXE(NSIS) · 現在のユーザー
サイレントインストール
Codespace-Setup-1.6.1.exe /Sインストール先を指定
Codespace-Setup-1.6.1.exe /S /D=C:\Apps\codespace- アンインストール用レジストリキー
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\0c108a88-c98a-575f-b77e-4d8844291bbf
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-codespace.ps1
$url = 'https://codespace.app/updates/Codespace-Setup-1.6.1.exe'
$sha256 = 'C478762538DD24D56034416BD4F58F545B97197C761B219E6B94899250842C2D'
$file = Join-Path $env:TEMP 'Codespace-Setup-1.6.1.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