One-click download and update VSCode Portable to a specified directory. Supports stable and insider channels, auto-detects system architecture (x64 / arm64).
# Run directly (installs to VSCode/ next to the script)
.\Update-VSCodePortable.ps1
# Specify install path
.\Update-VSCodePortable.ps1 -Path "D:\tools\VSCode"
# Check for updates only
.\Update-VSCodePortable.ps1 -CheckOnly- Windows 10 / 11 (or Windows Server 2016+)
- PowerShell 5.1 or later
- Administrator rights recommended (not required — a warning is shown if not elevated)
| Parameter | Description |
|---|---|
-Path <path> |
VSCode Portable install path (auto-saved when changed) |
-Channel <stable|insider> |
Update channel, default stable |
-Architecture <auto|x64|arm64> |
System architecture, default auto (auto-detect) |
-Lang <zh|en> |
Display language, default en (auto-saved when changed) |
-Force |
Skip all prompts, auto-close running VSCode |
-CheckOnly |
Check version only, no download or update |
-Restore <name|auto> |
Restore from backup, auto picks the latest |
-Help |
Show help |
# Install/update to default path (VSCode/ next to the script)
.\Update-VSCodePortable.ps1
# Install to a custom path
.\Update-VSCodePortable.ps1 -Path "D:\tools\VSCode"
# Use insider channel with arm64 architecture
.\Update-VSCodePortable.ps1 -Channel insider -Architecture arm64
# Skip all confirmation prompts
.\Update-VSCodePortable.ps1 -Force
# Check version only
.\Update-VSCodePortable.ps1 -CheckOnly
# Restore from backup
.\Update-VSCodePortable.ps1 -Restore auto- Queries the latest version via the official VSCode update API
- Compares with the current version; downloads the zip to
Downloads\if an update is available - Backs up old files to
VSCode-old-{timestamp}/(preserves thedata/directory) - Extracts the new version to the install directory
- Auto-saves install path and language preference
The script modifies itself to persist settings in the following cases:
- First use of
-Path→ saves install path - Use of
-Lang→ saves language preference
This is intentional — keeping everything in a single file with no external config. If you manage it with git, these changes are expected.