Skip to content

PythonChicken123/Minecraft-Portable-Web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

174 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minecraft Portable Web Launcher

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.

Preview

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.

Features

  • 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 mods and resourcepacks (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

Folder Structure & Trusted Dir Strategy

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

Requirements

  • 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.

TL;DR

  • Load all executables and dlls on the RAM, disk-less, undetectable

Getting Started

git clone https://github.com/PythonChicken123/Minecraft-Portable-Web/
cd Minecraft-Portable-Web
git switch scripts
python main.py

Then choose a method:

  • 1 – Web launcher (opens portablemc.py in your browser)
  • 2 – MSBuild launcher (uses Launcher.targets, compiles C# loader in memory)
  • 3 – CLI launcher (runs portablemc directly in the terminal)
  • 4 - Debug Menu (shows a hidden debug list)

How It Works (Bypass Chain)

The launcher tries the most reliable method first, falling back if blocked:

  1. Embedded Python + portablemc (if the system allows Python execution).
  2. MSBuild + C# compilation (uses csc.exe to compile a tiny loader).
  3. PowerShell (with -ExecutionPolicy Bypass).
  4. 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.

Development

  • Linting: Ruff is used – run ruff check . and ruff format . before committing.
  • Workflow: The GitHub Actions workflow (.github/workflows/main.yml) automatically applies Ruff fixes on push/pull requests.

Troubleshooting

  • 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=RUNASINVOKER to 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.

Found a bug? / Have a suggestion?

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!

License

MIT

Libraries Used

About

26.1 Minecraft without executables or java made using python

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors