A console-based C++ security utility that prevents selected applications from running by monitoring processes and terminating unauthorized programs in real time.
DeskLock is a lightweight Windows monitoring tool written in C++ that runs in the background and automatically blocks specific applications from running.
It continuously scans running processes and terminates any application that appears in the blocklist.
The application includes an interactive CLI control panel, password protection, and a persistent configuration system.
This project demonstrates practical Windows systems programming concepts, including:
- Process enumeration
- System-level process control
- Multithreading
- Secure CLI input
- File-based configuration management
Continuously scans running processes using the Windows Tool Help API (tlhelp32.h).
Blocked applications are immediately terminated using the TerminateProcess Windows API.
A simple CLI menu system allows administrators to manage blocked applications.
1. View Blocked Applications
2. Add Application to Blocklist
3. Remove Application
4. Temporary Unlock
5. Save and Exit
Administrative controls are protected using hidden input via conio.h.
Default password:
admin
Allows applications to run temporarily.
Example:
Allow chrome.exe for 5 minutes
After the timer expires, the app is blocked again automatically.
DeskLock stores settings inside a JSON configuration file.
Saved data includes:
- Admin password
- Blocked applications list
- Temporary unlock timers
| Technology | Purpose |
|---|---|
| C++ | Core programming language |
| Windows API | Process monitoring & termination |
| tlhelp32.h | Process snapshot enumeration |
| conio.h | Hidden password input |
| JSON | Configuration storage |
| Multithreading | Continuous monitoring |
- Windows OS
- MinGW (GCC) or MSVC Compiler
- Make / mingw32-make
git clone https://github.com/blckspidey/DeskLock.git
cd DeskLockmingw32-make.\build\DeskLock.exeRun the executable.
Enter the default password:
admin
Example applications to block:
chrome.exe
cmd.exe
notepad.exe
discord.exe
Select:
Save and Exit
DeskLock will begin monitoring and terminating blocked processes automatically.
DeskLock
│
├── src
│ ├── main.cpp
│ ├── process_monitor.cpp
│ ├── control_panel.cpp
│
├── build
│ └── DeskLock.exe
│
├── config.json
│
├── Makefile
│
└── README.md
DeskLock follows this workflow:
Start Program
│
▼
Load Config File
│
▼
Start Background Monitor Thread
│
▼
Scan Running Processes
│
▼
Match Against Blocklist
│
▼
Terminate Unauthorized Applications
This loop runs continuously to ensure blocked applications cannot remain active.
This project was created for educational purposes only to demonstrate:
- Windows process management
- C++ systems programming
- Background monitoring techniques
DeskLock should not replace professional antivirus or enterprise endpoint management tools.
- 🖼 GUI Version
- 🔔 System Tray Background Service
- 📊 Activity Logging
- 🔑 Secure Password Hashing
- ⚡ Performance Optimization
- 🖥 Windows Startup Integration
Developed as a C++ Systems Programming Project.
⭐ If you like this project, consider starring the repository!