Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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]
ParameterTypeDescription
-ScriptRootstringOverride project root directory (auto-detected if omitted).
-TargetDirstringExplicit installation path (overrides DefaultInstallDir).
-Productvscode | vscodiumOverride DefaultProduct.
-Channelstable | insidersOverride DefaultChannel.
-PresetstringComma-separated optional profile name(s) or .ini path(s) (overrides OptionalProfiles).
-SkipContextMenuswitchDo not register Explorer context menus.
-SkipPathswitchDo not add bin\ to User PATH.
-SkipSettingsswitchDo not modify settings.json.
-SkipExtensionsswitchDo not install preconfigured extensions.
-SkipDependenciesswitchCheck dependencies without installing missing portable tools.
-InstallDependenciesswitchAuto-install missing portable dependencies without prompting.
-OverwriteSettingsswitchOverwrite conflicting existing keys in settings.json.
-ForceswitchSkip 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]
ParameterTypeDescription
-ScriptRootstringOverride project root directory.
-TargetDirstringTarget portable folder (auto-discovers if omitted).
-ForceswitchSkip 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]
ParameterTypeDescription
-ScriptRootstringOverride project root directory.
-TargetDirstringTarget portable folder (auto-discovers if omitted).
-ModestringInteractive (default), Status, Settings, AddContextMenu, RemoveContextMenu, AddPath, RemovePath, InstallExtensions, CheckDependencies, ExportProfile, ImportProfile.
-PresetstringOptional profile name(s) or .ini path(s) for Settings, InstallExtensions, or CheckDependencies.
-ProfilePathstringJSON bundle path for ExportProfile / ImportProfile.
-OverwriteswitchOverwrite conflicting keys in settings.json.
-SkipDependenciesswitchSkip installing missing portable dependencies.
-InstallDependenciesswitchAuto-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]
ParameterTypeDescription
-ScriptRootstringOverride project root directory.
-TargetDirstringExplicit folder to clean up/uninstall.
-RegistryOnlyswitchRemove context menus, MuiCache entries, and User PATH entries while keeping all files on disk.
-ForceswitchSkip per-target confirmation prompts.