Visual Studio Code in PortableApps.com format (unofficial).
Support some well known development environments, and will also try to portabilize files for those environments (e.g. Git, Python, Node.js). See the full list here.
In order for portablization to work, you should always run from VSCodePortable.exe instead of Code.exe directly. VSCodePortable.exe will monitor things and clean them up when you close Visual Studio Code.
If you're using it for the first time, you can stop at step 2. If you're updating from older release, follow all these steps:
- Download the latest release of VSCodePortable
- Run the portable installer, and it will download the latest version of VS Code automatically
- If you want to update VS Code only (not the launcher), download VS Code manually and replace the
App\VSCodefolder. However, don't delete theApp\VSCode\Datafolder because that's where your VS Code data are stored - Compare
Data\settings\Custom.iniwithApp\FirstRun\settings\Custom.ini(the newest revision), and backup yourDatafolder. This is recommended because I occasionally release breaking changes (e.g. changing folder structures) - Run
VSCodePortable.exe, test your usual environment (e.g. Python), and see if there's structural changes in theDatafolder. Once you're familiar with the new changes, you can copy back your old data selectively - Done
Note: If Windows blocked you from running the app, right click the file, select "Properties" then "Unblock". This is the standard treatment for most files downloaded from the internet.
Below is an example of Custom.ini file (example may not be up-to-date). You can check what environments are supported in this file.
[Path]
Base=%PATH%
[Git]
Path=%PAL:CommonFilesDir%\Git
; Change "HOME" to misc folder
ChangeUnixHome=true
[MinGW]
Path=%PAL:CommonFilesDir%\MinGW
[Java]
Path=%PAL:CommonFilesDir%\Java
; Change "GRADLE_USER_HOME" to misc folder
ChangeGradleUserHome=true
[Python]
Path=%PAL:CommonFilesDir%\Python
; Change "PYTHONUSERBASE" to misc folder
ChangePythonUserBase=true
; Change "PIP_CACHE_DIR" to misc folder
ChangePipCache=true
; Delete pip cache if the above is true
DeletePipCacheOnExit=true
; Change "JUPYTER_DATA_DIR" to misc folder
ChangeJupyterData=true
[R]
Path=%PAL:CommonFilesDir%\R
; Change "R_LIBS_USER" to misc folder
ChangeRLibsUser=true
[NodeJS]
Path=%PAL:CommonFilesDir%\NodeJS
; Change "NPM_CONFIG_PREFIX" to misc folder
ChangeNpmPrefix=true
; Delete npm cache if the above is true
DeleteNpmCacheOnExit=true
[Bun]
Path=%PAL:CommonFilesDir%\Bun
; Change "BUN_INSTALL" to misc folder
ChangeBunInstall=true
; Delete Bun cache if the above is true
DeleteBunCacheOnExit=true
[Go]
Path=%PAL:CommonFilesDir%\Go
; Change "GOPATH" to misc folder
ChangeGoPath=true
[Rust]
Path=%PAL:CommonFilesDir%\Rust
; Change "CARGO_HOME" to misc folder
ChangeCargoHome=true
; Delete Cargo cache if the above is true
DeleteCargeCacheOnExit=true
[Android]
StudioPath=%PAL:CommonFilesDir%\Android\Studio
; Change "idea.config.path" to misc folder
ChangeAndroidStudioConfig=true
; Force change SDK and AVD path with junction
; SDK and AVD path must exist for this to work
UseSdkAvdJunction=true
SdkPath=%PAL:CommonFilesDir%\Android\Sdk
AvdPath=%PAL:CommonFilesDir%\Android\Avd
[Flutter]
Path=%PAL:CommonFilesDir%\Flutter
; Change "PUB_CACHE" to misc folder
ChangePubCache=true
[PlatformIO]
; Change "PLATFORMIO_CORE_DIR" to misc folder
ChangePlatformIOCore=trueThe logic behind these lies in the App\AppInfo\Launcher folder. If you made changes to files in this folder, recompile the launcher using this app.
If you place VSCodePortable on C:\Apps\VSCodePortable, then:
%PAL:CommonFilesDir%will beC:\Apps\CommonFiles%PAL:AppDir%will beC:\Apps\VSCodePortable\App%PAL:DataDir%will beC:\Apps\VSCodePortable\Data%PAL:LauncherDir%will beC:\Apps\VSCodePortable%PAL:PortableAppsDir%will beC:\Apps
See more path alias from here.
Here are some sources I personally use:
| Source | Description |
|---|---|
| WinLibs | Provides up-to-date GCC for Windows, faster than Mingw-w64 (which is usually slow at releasing updates) |
| Nuwen.net | May not always provides the latest version of GCC, but you can select only the components you need (smaller overall size) |
| Adoptium | Provides open-source version of (Java) JDK and JRE. Formerly known as AdoptOpenJDK |
| WinPython | Provides portable installer for Python. This is great since the official Python installer usually can't be extracted properly using workarounds (see below table). |
| MinGit | Absolute minimal Git directly from the official repo (see wiki), even smaller than the portable installer |
| MSYS2 | Lightweight WSL alternative that lets you download and update multiple packages using pacman without a hassle. Not thoroughly tested by me, some paths may differ than native Windows packages |
For other development environments that are not listed here (e.g. Node.js, Go, Rust), you can usually extract the files from installer using 7-Zip, Universal Extractor 2, or Sandboxie-Plus. However, try searching for .zip or .tar release first before relying on those programs!
- VSCodePortable under the GPL v2.0 license
- PortableApps.com Launcher under the GPL v2.0 license
- Visual Studio Code under Microsoft custom license