Skip to content

Manual Upgrade

Gareth Flowers edited this page Nov 17, 2023 · 1 revision

You can use the following PowerShell script to manually upgrade the VSCode installation.

Create a file in the root of the VSCode Portable installation directory, containing:

Write-Output "Downloading..."
Remove-item ".\App\VSCode.zip" -Force -ErrorAction SilentlyContinue
Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?Linkid=850641" -OutFile ".\App\VSCode.zip" -ErrorAction Stop

Write-Output "Backing up..."
Remove-item ".\App\VSCode.bak" -Recurse -Force -ErrorAction SilentlyContinue
Move-item ".\App\VSCode" -Destination ".\App\VSCode.bak" -Force -ErrorAction Stop

Write-Output "Unzipping..."
$null = New-Item ".\App\VSCode" -Force -ItemType Directory -ErrorAction Stop
Expand-Archive ".\App\VSCode.zip" -DestinationPath ".\App\VSCode" -ErrorAction Stop

Write-Output "Cleaning up..."
Remove-item ".\App\VSCode.zip" -Force -ErrorAction SilentlyContinue
Remove-item ".\App\VSCode.bak" -Recurse -Force -ErrorAction SilentlyContinue

Write-Output "Done..."
Clone this wiki locally