CLI Reference
All four scripts under src\ require PowerShell 7.x (pwsh.exe) and can be called directly for scripting or automation.
src\install.ps1 — Fresh Portable Install
Downloads, extracts, enables Portable Mode, integrates Explorer/PATH, installs missing portable dependencies, writes settings.json, and installs extensions.
pwsh -NoProfile -ExecutionPolicy Bypass -File src\install.ps1 [options]
| Parameter | Type | Description |
|---|---|---|
-ScriptRoot | string | Override project root directory (auto-detected if omitted). |
-TargetDir | string | Explicit installation path (overrides DefaultInstallDir). |
-Product | vscode | vscodium | Override DefaultProduct. |
-Channel | stable | insiders | Override DefaultChannel. |
-Preset | string | Comma-separated optional profile name(s) or .ini path(s) (overrides OptionalProfiles). |
-SkipContextMenu | switch | Do not register Explorer context menus. |
-SkipPath | switch | Do not add bin\ to User PATH. |
-SkipSettings | switch | Do not modify settings.json. |
-SkipExtensions | switch | Do not install preconfigured extensions. |
-SkipDependencies | switch | Check dependencies without installing missing portable tools. |
-InstallDependencies | switch | Auto-install missing portable dependencies without prompting. |
-OverwriteSettings | switch | Overwrite conflicting existing keys in settings.json. |
-Force | switch | Skip confirmation if target directory already contains an editor. |
src\update.ps1 — In-Place Binary Update
Updates editor binaries in-place while preserving the entire portable data\ folder (settings, extensions, workspace state).
pwsh -NoProfile -ExecutionPolicy Bypass -File src\update.ps1 [options]
| Parameter | Type | Description |
|---|---|---|
-ScriptRoot | string | Override project root directory. |
-TargetDir | string | Target portable folder (auto-discovers if omitted). |
-Force | switch | Skip update confirmation and up-to-date tag check prompts. |
src\configure.ps1 — Standalone Configurator
Interactive dashboard and non-interactive CLI for managing existing portable installations.
pwsh -NoProfile -ExecutionPolicy Bypass -File src\configure.ps1 [options]
| Parameter | Type | Description |
|---|---|---|
-ScriptRoot | string | Override project root directory. |
-TargetDir | string | Target portable folder (auto-discovers if omitted). |
-Mode | string | Interactive (default), Status, Settings, AddContextMenu, RemoveContextMenu, AddPath, RemovePath, InstallExtensions, CheckDependencies, ExportProfile, ImportProfile. |
-Preset | string | Optional profile name(s) or .ini path(s) for Settings, InstallExtensions, or CheckDependencies. |
-ProfilePath | string | JSON bundle path for ExportProfile / ImportProfile. |
-Overwrite | switch | Overwrite conflicting keys in settings.json. |
-SkipDependencies | switch | Skip installing missing portable dependencies. |
-InstallDependencies | switch | Auto-install missing portable dependencies without prompting. |
Examples
# Inspect installation health (version, portable data, context menus, PATH, settings, extensions)
pwsh -File src\configure.ps1 -TargetDir "D:\IDE\VSCode" -Mode Status
# Apply low-end + no-ai profiles non-interactively
pwsh -File src\configure.ps1 -TargetDir "D:\IDE\VSCode" -Mode Settings -Preset "low-end,no-ai" -Overwrite
# Check and install missing portable dependencies for installed + configured extensions
pwsh -File src\configure.ps1 -TargetDir "D:\IDE\VSCode" -Mode CheckDependencies -InstallDependencies
# Export settings.json + installed extensions list to a portable JSON backup
pwsh -File src\configure.ps1 -TargetDir "D:\IDE\VSCode" -Mode ExportProfile -ProfilePath ".\my-backup.json"
# Restore backup onto a fresh portable installation
pwsh -File src\configure.ps1 -TargetDir "D:\IDE\VSCodium" -Mode ImportProfile -ProfilePath ".\my-backup.json"
src\uninstall.ps1 — Removal & Cleanup
Auto-discovers portable installations (including stale registry/PATH leftovers of manually deleted folders) for clean removal.
pwsh -NoProfile -ExecutionPolicy Bypass -File src\uninstall.ps1 [options]
| Parameter | Type | Description |
|---|---|---|
-ScriptRoot | string | Override project root directory. |
-TargetDir | string | Explicit folder to clean up/uninstall. |
-RegistryOnly | switch | Remove context menus, MuiCache entries, and User PATH entries while keeping all files on disk. |
-Force | switch | Skip per-target confirmation prompts. |