A Python‑based Minecraft launcher that runs in a browser using Flask and PortableMC. Designed for restricted Windows environments where arbitrary .exe files are blocked. It uses multiple fallback mechanisms (C# compilation, PowerShell, VBScript) to bypass Group Policy restrictions if required.
Warning
Usage of the MSBuild bypass method is for education, launcher portability, and system compatibility testing. Do not use it for bypassing security policy without authorization.
- Web interface with live console (via Flask‑SocketIO)
- CLI mode for direct terminal launching
- MSBuild fallback – compiles a C# loader on‑the‑fly
- PowerShell & VBScript fallbacks for the most restricted environments
- Junctions for
modsandresourcepacks(or regular directories if junctions are blocked) - All data stored in
%LOCALAPPDATA%\PortableMC– no clutter in the project folder - Debugging Menu - hidden option with many debugging options
The launcher uses a hybrid strategy to find a writable/executable directory, prioritizing %LOCALAPPDATA%\PortableMC, then falling back to %TEMP% or %PUBLIC% if necessary.
Minecraft-Portable-Web/
├── main.py # Entry point – menu & bootstrapping
├── scripts/ # Launcher helper scripts
│ ├── Launcher.targets # MSBuild task
│ ├── PortableMCLoader.cs # C# loader (compiled if needed)
│ ├── Launcher.vbs # VBScript fallback
│ └── Launcher.ps1 # PowerShell fallback
| └── portablemc.py # Web server (Flask + SocketIO)
├── static/ # Web UI Assets
├── mods/ (optional) your mods
├── resourcepacks/ (optional) your resource packs
├── options.txt (optional) Minecraft settings
└── servers.dat (optional) server list
- Windows 10/11
- Python 3.11+ (or the script will download an embedded Python 3.14).
- (Optional) MSBuild (comes with .NET Framework 4.8) – used for the C# fallback.
- (Optional) PowerShell 3.0+ – used as a fallback.
- (Optional) VBScript support – used as a final fallback.
- Load all executables and dlls on the RAM, disk-less, undetectable
git clone https://github.com/PythonChicken123/Minecraft-Portable-Web/
cd Minecraft-Portable-Web
git switch scripts
python main.pyThen choose a method:
1– Web launcher (opensportablemc.pyin your browser)2– MSBuild launcher (usesLauncher.targets, compiles C# loader in memory)3– CLI launcher (runsportablemcdirectly in the terminal)4- Debug Menu (shows a hidden debug list)
The launcher tries the most reliable method first, falling back if blocked:
- Embedded Python + portablemc (if the system allows Python execution).
- MSBuild + C# compilation (uses
csc.exeto compile a tiny loader). - PowerShell (with
-ExecutionPolicy Bypass). - VBScript (via
cscript).
If a method is blocked, it tries the next. All launchers set __COMPAT_LAYER=RUNASINVOKER to avoid UAC prompts. If all methods fail, the script will leave a log dump which you can use to open an issue
All downloaded files (embedded Python, portablemc binary) are stored in %LOCALAPPDATA%\PortableMC. Junctions are created for mods and resourcepacks so that files placed in the project folder appear inside the game.
- Linting: Ruff is used – run
ruff check .andruff format .before committing. - Workflow: The GitHub Actions workflow (
.github/workflows/main.yml) automatically applies Ruff fixes on push/pull requests.
OSError: [WinError 1260]– Group Policy blocks the method you chose. Try another option.- PowerShell / VBScript errors – Ensure the scripts have proper permissions. The launcher sets
__COMPAT_LAYER=RUNASINVOKERto avoid UAC prompts. - SSL errors – The C# loader and Python scripts force TLS 1.2 and fall back to disabling certificate validation.
- Junction creation fails – The launcher falls back to creating regular directories.
If you encounter any issues or have an idea to improve the launcher, please open an issue and use the appropriate template. We welcome contributions!
MIT
- PortableMC – The Heart of The Launcher
- Flask & Flask‑SocketIO – Web Interface
- ansi2html & ansi_up – ANSI colour conversion
- Socket.io - Communication between the web and Flask interfaces
- Ruff Linter - An extremely fast Python linter
- uv - An extremely fast Python package and project manager, written in Rust.
