Opdragte om Microsoft Visual Studio Code sonder vrae te installeer, weer te verwyder en vanuit ontplooiingsgereedskap op te spoor. ’n Opdrag word net gewys as dit seker is: uit die manifes of die gedokumenteerde verstek van die installeertegnologie.
Verwante gids: Skakelaars vir stil installasie: MSI, NSIS, Inno Setup · Deïnstalleer ’n program via die register of PowerShell
Met 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 --silentVolgens installeerder
64-bis · EXE (Inno Setup) · Huidige gebruiker · en-US
Stil installasie
VSCodeUserSetup-x64-1.143.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Eie lêergids
VSCodeUserSetup-x64-1.143.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\microsoft-visual-studio-code"64-bis · EXE (Inno Setup) · Alle gebruikers · en-US
Stil installasie
VSCodeSetup-x64-1.143.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Eie lêergids
VSCodeSetup-x64-1.143.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\microsoft-visual-studio-code"ARM64 · EXE (Inno Setup) · Huidige gebruiker · en-US
Stil installasie
VSCodeUserSetup-arm64-1.143.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Eie lêergids
VSCodeUserSetup-arm64-1.143.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\microsoft-visual-studio-code"ARM64 · EXE (Inno Setup) · Alle gebruikers · en-US
Stil installasie
VSCodeSetup-arm64-1.143.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Eie lêergids
VSCodeSetup-arm64-1.143.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\microsoft-visual-studio-code"PowerShell: aflaai, nagaan, installeer
Laai die amptelike lêer af, gaan die SHA256 na en installeer dit stil.
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