A lightweight Windows utility that sends Telegram alerts when your PC starts and reports previous shutdown/restart details on the next startup.
⬇️ Download Latest Windows Installer
Windows11Alert is a lightweight Windows monitoring utility that sends Telegram alerts when your PC starts.
It also checks Windows Event Logs to detect the previous shutdown/restart event and sends that information on the next startup.
This tool is useful for monitoring when a Windows PC is turned on, restarted, or previously shut down.
- 🟢 Sends Telegram message when PC turns on
- 🔴 Sends previous shutdown/restart details on next startup
- 🖥️ Includes PC name, username, IP address, OS, RAM, processor, and boot time
- 📜 Reads Windows Event Log for shutdown/restart events
- 🔐 Uses
.envfile for Telegram Bot Token and Chat ID - 🚀 Automatically adds itself to Windows startup registry
- 📦 Can be packaged as
.exeusing PyInstaller - 🛠️ Supports installer creation using Inno Setup
- 🧹 Includes uninstaller support
🟢 PC Turned On
🖥️ PC Name: DEV2
👤 User: HP-User1
🌐 Local IP: 192.168.0.5
🌍 Public IP: xxx.xxx.xxx.xxx
📅 Date & Time: 2026-05-16 15:30:12
⏱️ Boot Time: 2026-05-16 15:29:40
💻 OS: Windows 11
🔢 OS Version: 10.0.xxxxx
⚙️ Processor: Intel64 Family...
🏗️ Architecture: AMD64
🧠 RAM: 15.78 GB Total
TELEGRAMPCALERT/
│
├── icons/
│ ├── alert.ico
│ └── uninstaller.ico
│
├── Windows11Alert.py
├── uninstaller.py
├── Windows11Alert_Setup.iss
├── README.md
├── .gitignore
│
├── build/ # Generated by PyInstaller
├── dist/ # Generated EXE files
└── Output/ # Generated Inno Setup installer
Install the required Python packages:
pip install requests psutil python-dotenv pyinstallerCreate a .env file in the project root or beside the final EXE:
TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
TELEGRAM_CHAT_ID=your_telegram_chat_id_hereDo not push
.envto GitHub. It contains sensitive credentials.
- Open Telegram.
- Search for
BotFather. - Send:
/newbot
- Create your bot and copy the bot token.
- Send a message to your bot.
- Open this URL in browser:
https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates
- Find your chat ID from the response.
python Windows11Alert.pyOn first run, the app will add itself to Windows startup registry.
Build the main app:
pyinstaller --onefile --noconsole --icon=icons/alert.ico --name Windows11Alert Windows11Alert.pyBuild the uninstaller:
pyinstaller --onefile --noconsole --icon=icons/uninstaller.ico --name uninstaller uninstaller.pyGenerated files will be inside:
dist/
Open:
Windows11Alert_Setup.iss
Compile it using Inno Setup Compiler.
The final installer will be generated inside:
Output/
Example output:
Output/Windows11Alert_Setup.exe
Windows11Alert automatically registers itself here:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
This means the app starts automatically when the current Windows user logs in.
The uninstaller removes Windows11Alert from startup and closes the running process.
It removes the startup registry value:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\Windows11Alert
- Never commit
.envto GitHub. - Never hardcode your Telegram Bot Token inside the Python file.
- If your token is leaked, regenerate it using BotFather.
.envis safer than hardcoding, but anything stored on a local PC can still be read by the PC user/admin.- For production-level security, use a backend server/proxy instead of storing bot tokens locally.
This project ignores generated and sensitive files:
.env
build/
dist/
Output/
__pycache__/
*.spec
- Shutdown alerts are based on Windows Event Logs and are sent on the next startup.
- Instant shutdown-time Telegram alerts are not always reliable because Windows may close network services quickly.
- Unexpected power loss may not always create a clean shutdown event.
- This tool is designed for Windows only.
Contributions are welcome and appreciated.
You can help improve Windows11Alert by:
- Reporting bugs
- Suggesting new features
- Improving documentation
- Refactoring code
- Adding better installer/uninstaller support
- Improving Telegram alert formatting
- Adding support for more notification platforms
This project is free to use and modify.
Built with Python, Telegram Bot API, PyInstaller, and Inno Setup.