免互動安裝Microsoft Visual Studio Code Insiders、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Microsoft.VisualStudioCode.Insiders -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.VisualStudioCode.Insiders -e --silentwinget uninstall --id Microsoft.VisualStudioCode.Insiders -e --silent依安裝檔
64位元 · EXE(Inno Setup) · 僅目前使用者
靜默安裝
VSCodeUserSetup-x64-1.127.0-insider.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
VSCodeUserSetup-x64-1.127.0-insider.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\microsoft-visual-studio-code-insiders"64位元 · EXE(Inno Setup) · 所有使用者
靜默安裝
VSCodeSetup-x64-1.127.0-insider.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
VSCodeSetup-x64-1.127.0-insider.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\microsoft-visual-studio-code-insiders"ARM64 · EXE(Inno Setup) · 僅目前使用者
靜默安裝
VSCodeUserSetup-arm64-1.127.0-insider.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
VSCodeUserSetup-arm64-1.127.0-insider.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\microsoft-visual-studio-code-insiders"ARM64 · EXE(Inno Setup) · 所有使用者
靜默安裝
VSCodeSetup-arm64-1.127.0-insider.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
VSCodeSetup-arm64-1.127.0-insider.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\microsoft-visual-studio-code-insiders"PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-microsoft-visual-studio-code-insiders.ps1
$url = 'https://vscode.download.prss.microsoft.com/dbazure/download/insider/4fe60c8b1cdac1c4c174f2fb180d0d758272d713/VSCodeUserSetup-x64-1.127.0-insider.exe'
$sha256 = '56DFC39B7828F708236FB44BAB8C39C647E1D5FD0CB12D5CEDE61B0DEBAD6A09'
$file = Join-Path $env:TEMP 'VSCodeUserSetup-x64-1.127.0-insider.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-microsoft-visual-studio-code-insiders.ps1
$url = 'https://vscode.download.prss.microsoft.com/dbazure/download/insider/4fe60c8b1cdac1c4c174f2fb180d0d758272d713/VSCodeSetup-x64-1.127.0-insider.exe'
$sha256 = '5C158C0095AEF6245A5D81EE099A7425A005C53BC8606D7DDC714F67A44037D5'
$file = Join-Path $env:TEMP 'VSCodeSetup-x64-1.127.0-insider.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-microsoft-visual-studio-code-insiders.ps1
$url = 'https://vscode.download.prss.microsoft.com/dbazure/download/insider/4fe60c8b1cdac1c4c174f2fb180d0d758272d713/VSCodeUserSetup-arm64-1.127.0-insider.exe'
$sha256 = 'C770EA5A3E7F84A661B698CA3F4588E9297564F4F495F3DD237FAE438AFA4E62'
$file = Join-Path $env:TEMP 'VSCodeUserSetup-arm64-1.127.0-insider.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-microsoft-visual-studio-code-insiders.ps1
$url = 'https://vscode.download.prss.microsoft.com/dbazure/download/insider/4fe60c8b1cdac1c4c174f2fb180d0d758272d713/VSCodeSetup-arm64-1.127.0-insider.exe'
$sha256 = 'C98E4080926B39DAA46DB8D8D42EB7F2E69E177F512B1EDDAEF286BE8D0A9F75'
$file = Join-Path $env:TEMP 'VSCodeSetup-arm64-1.127.0-insider.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