I comandi per installare Microsoft Visual Studio Code senza richieste, rimuoverlo e rilevarlo dagli strumenti di distribuzione. Un comando compare solo quando è certo: preso dal manifest o dal valore predefinito documentato della tecnologia di installazione.
Guida correlata: Installazione silenziosa: MSI, NSIS, Inno Setup · Disinstallare programmi dal registro o con PowerShell
Con winget
PowerShell
winget install --id Microsoft.VisualStudioCode -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.VisualStudioCode -e --silentwinget uninstall --id Microsoft.VisualStudioCode -e --silentPer installer
64 bit · EXE (Inno Setup) · Utente corrente · en-US
Installazione silenziosa
VSCodeUserSetup-x64-1.143.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Cartella personalizzata
VSCodeUserSetup-x64-1.143.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\microsoft-visual-studio-code"64 bit · EXE (Inno Setup) · Tutti gli utenti · en-US
Installazione silenziosa
VSCodeSetup-x64-1.143.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Cartella personalizzata
VSCodeSetup-x64-1.143.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\microsoft-visual-studio-code"ARM64 · EXE (Inno Setup) · Utente corrente · en-US
Installazione silenziosa
VSCodeUserSetup-arm64-1.143.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Cartella personalizzata
VSCodeUserSetup-arm64-1.143.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\microsoft-visual-studio-code"ARM64 · EXE (Inno Setup) · Tutti gli utenti · en-US
Installazione silenziosa
VSCodeSetup-arm64-1.143.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Cartella personalizzata
VSCodeSetup-arm64-1.143.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\microsoft-visual-studio-code"PowerShell: scarica, verifica, installa
Scarica il file ufficiale, ne verifica l’hash SHA256 e lo installa in modo silenzioso.
install-microsoft-visual-studio-code.ps1
$url = 'https://vscode.download.prss.microsoft.com/dbazure/download/stable/e646868227c3e3a9e3f24277c8c7220be42c0be7/VSCodeUserSetup-x64-1.143.1.exe'
$sha256 = '7CB4C13A1B20C8BBA749604A28198585FC45C64A01E5C819C300A42079696519'
$file = Join-Path $env:TEMP 'VSCodeUserSetup-x64-1.143.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-microsoft-visual-studio-code.ps1
$url = 'https://vscode.download.prss.microsoft.com/dbazure/download/stable/e646868227c3e3a9e3f24277c8c7220be42c0be7/VSCodeSetup-x64-1.143.1.exe'
$sha256 = '24FABFE6F7C55C068C34B4FAEB7B1CB405ABEFFCABD7CFFFAE6C4BE151CD7148'
$file = Join-Path $env:TEMP 'VSCodeSetup-x64-1.143.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-microsoft-visual-studio-code.ps1
$url = 'https://vscode.download.prss.microsoft.com/dbazure/download/stable/e646868227c3e3a9e3f24277c8c7220be42c0be7/VSCodeUserSetup-arm64-1.143.1.exe'
$sha256 = '50A48ED5B04693A708FCB7660DACDA8274CC8ADC5DA323D9530DEC244DDCB59F'
$file = Join-Path $env:TEMP 'VSCodeUserSetup-arm64-1.143.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-microsoft-visual-studio-code.ps1
$url = 'https://vscode.download.prss.microsoft.com/dbazure/download/stable/e646868227c3e3a9e3f24277c8c7220be42c0be7/VSCodeSetup-arm64-1.143.1.exe'
$sha256 = 'FCC85EB8C4676140446BFD3C7C5905749203EE93117B8D37AF18B910289B7B77'
$file = Join-Path $env:TEMP 'VSCodeSetup-arm64-1.143.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait