📋 Requirements
🔄 Versions
⚙️ Compilation
🚀 Usage
🔧 Troubleshooting
🤝 Contributing
🐛 Issues
💿 Releases
Check this out for the full note: Check my latest projects!
This is a GUI app builded with Go for Windows than generates ´.bat´ files with the compatibility layer ´RunAsInvoker´ for run executables ´.exe´ without elevating privileadges UAC. It is compatible with almost every windows system, like Windows 7, Windows 10 and Windows 11.
Important
I am not responsible for the uses of this tool, and if you do something ilegal or bad with it, it is your responasbility
This repository includes 2 versions of the project, each one of them optimized for diferent enviroments and compabilities. We strongly recommend the usage of the Main version
-
Main (parent directory:
../) GUI version made with Fyne (modern UI with tabs). Stable support for Windows 10/11. experimental support for Windows 7/8, but with graphical aceleration requirement (OpenGL/DirectX). Ideal for new users than dont really know too much about it -
Legacy (actual directory:
Legacy/): CLI version with native Windows dialogs and manual fallback. It supports every windows from Windows 7 SP1+ without dependences requirements, like MinGW. Usefull for legacy or old systems without GUI
Directories:
cd .. # For Main (main, Win10/11)
cd Legacy # For Legacy (secondary, Win7)Note
The main version uses its own go.mod file. Compile separately for dont have dependences conflicts
Important
Compilate with Go 1.20.14 for windows 7 support (newer versions fail because bcryptprimitives.dll).
Caution
for compile la legacy version, necesitas Go 1.20.14 y golang.org/x/sys@v0.7.0.
Tip
Usa goenv para manejar múltiples versiones de Go sin conflictos.
Se recomienda encarecidamente compilar desde alguna distribución de linux, en el caso de windows, usa WSL mas info aqui
-
Instala MinGW:
sudo apt update && sudo apt install -y gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 gcc-mingw-w64-i686 g++-mingw-w64-i686 python3 git curl build-essential -
Instala goenv:
git clone https://github.com/syndbg/goenv.git ~/.goenv echo 'export GOENV_ROOT="$HOME/.goenv"' >> ~/.bashrc echo 'command -v goenv >/dev/null || export PATH="$GOENV_ROOT/bin:$PATH"' >> ~/.bashrc echo 'eval "$(goenv init -)"' >> ~/.bashrc source ~/.bashrc goenv install $(goenv install -l | grep -v rc | tail -1) # Versión más reciente para Main goenv install 1.20.14 # Para Legacy
-
Navega al directorio padre:
cd ~/WinPass # Directorio de Main
-
Prepara Dependencias:
go mod tidy # Resuelve dependencias de Fyne -
Compila (requiere CGO para Fyne/OpenGL):
goenv shell $(goenv install -l | grep -v rc | tail -1) # Usa la versión más reciente GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CGO_ENABLED=1 go build -ldflags="-s -w" -o BAT_GUI.exe main.go
- Para 32-bit: Cambia a
i686-w64-mingw32-gccyGOARCH=386. - Experimental Win7/8: Prueba con
-tags no_openglsi hay issues gráficos, pero soporte no garantizado.
- Para 32-bit: Cambia a
-
Navega y prepara:
goenv shell 1.20.14 # activa goenv 1.20.14 cd ~/WinPass/Legacy go mod init WinPass go get golang.org/x/sys@v0.7.0
-
Compila:
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o TEST.exe main.go
Binario Resultante: BAT_GUI.exe (Main, ~10-15 MB con Fyne) o TEST.exe (Legacy, ~2-3 MB).
Note
Para recuperar los binarios ya compilados, en el caso de que se use WSL, se recomienda usar python -m http.server 80 para poder moverlos facilmente.
Ejecuta ./Winpass.exe para abrir la interfaz gráfica con pestañas (Generador y Ejecutar). Selecciona archivos vía diálogos o manual. Recomendado para uso diario en Win10/11.
-
Ejecuta:
./TEST.exe
-
Menú:
- 1. Generar BAT: Ingresa ruta de
.exe(ej:C:\Juego\MiApp.exe). CreaMiApp_RunAsInvoker.bat. - 2. Ejecutar BAT: Ingresa ruta de
.bat. - 3. Salir.
- 1. Generar BAT: Ingresa ruta de
Ejemplo (Legacy):
--- Menú Principal ---
1. Generar BAT desde EXE (modo Generador)
2. Ejecutar BAT existente (modo Ejecutar)
3. Salir
Elige una opción (1-3): 1
Modo Generador: Selecciona el archivo .exe...
Ingresa la ruta completa del archivo .exe (ej: C:\Path\To\miapp.exe): C:\Windows\notepad.exe
Generando BAT...
BAT creado en: C:\Windows\notepad_RunAsInvoker.bat
[MessageBox: ¿Deseas ejecutar el BAT ahora?]
- "bcryptprimitives.dll not found" (Legacy): Usa Go 1.20.14.
- Diálogos no abren (Legacy): Ingresa ruta manual.
- Compilación con x/sys (Legacy):
go get golang.org/x/sys@v0.7.0. - Errores gráficos en Main (Win7/8 experimental): Habilita OpenGL o usa
-tags no_opengl; soporte limitado. - MinGW no encontrado (Main): Instala paquetes listados.
- Panic en runtime: Verifica struct
OPENFILENAME(Legacy) o dependencias Fyne (Main). - Pruebas: Genera BAT de
notepad.exey verifica sin UAC.
MIT License.
Reporta issues en GitHub. Pull requests bienvenidos.
¡Gracias por usar WinPass! Si hay bugs, abre una Issue. 🚀


