Created
March 17, 2026 11:55
-
-
Save Guiorgy/01c3e3a766b4d3ddc0abcd7d429a34e5 to your computer and use it in GitHub Desktop.
A Windows batch file to start the local NanoKVM-USB service
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 | |
| :: Download the latest NanoKVM-USB browser archive from https://github.com/sipeed/NanoKVM-USB/releases | |
| :: Extract it into the service subdirectory | |
| :: Download the latest Python Embeddable Package from https://www.python.org/downloads/ | |
| :: Extract it into the runtime subdirectory | |
| cd /d "%~dp0" | |
| set RUNTIME_DIR=runtime | |
| set PYTHON_BIN=%RUNTIME_DIR%\python.exe | |
| set APP_DIR=service | |
| set APP_ENTRY=-m http.server 8080 | |
| if not exist %PYTHON_BIN% ( | |
| echo [ERROR] Python Runtime not found at: %RUNTIME_DIR% | |
| pause | |
| exit /b 1 | |
| ) | |
| echo [INFO] Starting service | |
| cd %APP_DIR% | |
| "..\%PYTHON_BIN%" %APP_ENTRY% | |
| set APP_EXIT_CODE=%EXIT_CODE% | |
| cd .. | |
| if %APP_EXIT_CODE% neq 0 ( | |
| echo [ERROR] Service exited with error code: %APP_EXIT_CODE% | |
| pause | |
| ) | |
| exit /b %APP_EXIT_CODE% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment