Created
January 26, 2026 11:39
-
-
Save hyriph/7cd7c5304b659a44b48d49ba74aa7407 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| setlocal | |
| cd /d "%~dp0" | |
| net session >nul 2>&1 | |
| if %errorlevel% neq 0 ( | |
| powershell -NoProfile -ExecutionPolicy Bypass ^ | |
| -Command "Start-Process -FilePath '%~f0' -Verb RunAs" | |
| exit /b | |
| ) | |
| REM .venv의 python으로 실행 + cmd 창 유지 (불필요한 출력 없음) | |
| start "MyApp (Admin)" cmd /k ""%~dp0.venv\Scripts\python.exe" "%~dp0main.py"" | |
| endlocal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment