https://github.com/steve02081504/ps12exe
better powershell code 2 exe repo wis: multilang sport, darkmode-able GUI(+BGM), RClick menu ext, webserver 4 online comp. All in only 1mb, superez4use, pure script (excl. deps/imgs/oggs). Compatible with PS2EXE useage.
https://github.com/steve02081504/ps12exe
compiler csharp gui gui-application online-compiler powershell powershell-module ps12exe ps12exe-gui ps2exe ps2exe-gui
Last synced: 15 days ago
JSON representation
better powershell code 2 exe repo wis: multilang sport, darkmode-able GUI(+BGM), RClick menu ext, webserver 4 online comp. All in only 1mb, superez4use, pure script (excl. deps/imgs/oggs). Compatible with PS2EXE useage.
- Host: GitHub
- URL: https://github.com/steve02081504/ps12exe
- Owner: steve02081504
- License: other
- Created: 2023-12-10T01:49:23.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-09-14T02:55:49.000Z (6 months ago)
- Last Synced: 2025-09-22T18:03:01.162Z (6 months ago)
- Topics: compiler, csharp, gui, gui-application, online-compiler, powershell, powershell-module, ps12exe, ps12exe-gui, ps2exe, ps2exe-gui
- Language: PowerShell
- Homepage: https://steve02081504.github.io/ps12exe/
- Size: 2 MB
- Stars: 117
- Watchers: 2
- Forks: 7
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ps12exe
> [!CAUTION]
> Do not store passwords in source code!
> See [localed readme](https://steve02081504.github.io/ps12exe/readme#password-security-stuff) for more details.
## Introduction
ps12exe is a PowerShell module that allows you to create an executable file from a .ps1 script.
[](https://github.com/steve02081504/ps12exe/actions/workflows/CI.yml)
[](https://www.powershellgallery.com/packages/ps12exe)
[](https://github.com/steve02081504/ps12exe/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
[](https://app.codacy.com/gh/steve02081504/ps12exe/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[](https://www.codefactor.io/repository/github/steve02081504/ps12exe/overview/master)
[](http://makeapullrequest.com)

[](./docs/README_CN.md)
[](./docs/README_EN_UK.md)
[](./docs/README_EN_US.md)
[](./docs/README_JP.md)
[](./docs/README_FR.md)
[](./docs/README_ES.md)
[](./docs/README_HI.md)
## Install
```powershell
Install-Module ps12exe #Install ps12exe module
Set-ps12exeContextMenu #Set right-click menu
```
(you can also clone this repository and run `./ps12exe.ps1` directly)
**Hard to upgrade from PS2EXE to ps12exe? No problem!**
PS2EXE2ps12exe can hooks PS2EXE calls into ps12exe, All you need is just uninstall PS2EXE and install this, then use PS2EXE as normal.
```powershell
Uninstall-Module PS2EXE
Install-Module PS2EXE2ps12exe
```
## Usage
### Right-click menu
Once you have set `Set-ps12exeContextMenu`, you can quickly compile any ps1 file into an exe or open ps12exeGUI on this file by right-clicking on it.

### GUI mode
```powershell
ps12exeGUI
```
### Console mode
```powershell
ps12exe .\source.ps1 .\target.exe
```
compiles `source.ps1` into the executable target.exe (if `.\target.exe` is omitted, output is written to `.\source.exe`).
```powershell
'"Hello World!"' | ps12exe
```
compiles `"Hello World!"` into the executable `.\a.exe`.
```powershell
ps12exe https://raw.githubusercontent.com/steve02081504/ps12exe/master/src/GUI/Main.ps1
```
compiles `Main.ps1` from the internet into the executable `.\Main.exe`.
### Self-Host WebServer
```powershell
Start-ps12exeWebServer
```
Starts a web server that can be used to compile powerShell scripts online.
## Comparative Advantages 🏆
### Quick Comparison 🏁
| Comparison Content | ps12exe | [`MScholtes/PS2EXE@678a892`](https://github.com/MScholtes/PS2EXE/tree/678a89270f4ef4b636b69db46b31e1b4e0a9e1c5) |
| --- | --- | --- |
| Pure script repository 📦 | ✔️ All text files except images & dependencies | ❌ Contains exe files with open source license |
| Command to generate hello world 🌍 | 😎`'"Hello World!"' \| ps12exe` | 🤔`echo "Hello World!" *> a.ps1; PS2EXE a.ps1; rm a.ps1` |
| Size of the generated hello world executable file 💾 | 🥰1024 bytes | 😨25088 bytes |
| GUI multilingual support 🌐 | ✔️ | ❌ |
| Syntax check during compilation ✔️ | ✔️ | ❌ |
| Preprocessing feature 🔄 | ✔️ | ❌ |
| `-extract` and other special parameter parsing 🧹 | 🗑️ Removed | 🥲 Requires source code modification |
| PR welcome level 🤝 | 🥰 Welcome! | 🤷 14 PRs, 13 of which were closed |
### Detailed Comparison 🔍
Compared to [`MScholtes/PS2EXE@678a892`](https://github.com/MScholtes/PS2EXE/tree/678a89270f4ef4b636b69db46b31e1b4e0a9e1c5), this project brings the following improvements:
| Improvement Content | Description |
| --- | --- |
| ✔️ Syntax check during compilation | Syntax check during compilation to improve code quality |
| 🔄 Powerful preprocessing feature | Preprocess the script before compilation, no need to copy and paste all content into the script |
| 🛠️ `-CompilerOptions` parameter | New parameter, allowing you to further customize the generated executable file |
| 📦️ `-Minifyer` parameter | Preprocess the script before compilation to generate a smaller executable file |
| 🌐 Support for compiling scripts and included files from URL | Support for downloading icons from URL |
| 🖥️ Optimization of `-noConsole` parameter | Optimized option handling and window title display, you can now set the title of the custom pop-up window |
| 🧹 Removed exe files | Removed exe files from the code repository |
| 🌍 Multilingual support, pure script GUI | Better multilingual support, pure script GUI, support for dark mode |
| 📖 Separated cs files from ps1 files | Easier to read and maintain |
| 🚀 More improvements | And more... |
see [localed readme](https://steve02081504.github.io/ps12exe/readme) for more details.