Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/proteo5/Prevent-Screen-Saver/llms.txt

Use this file to discover all available pages before exploring further.

Every time Prevent Screen Saver starts, stops, registers a hotkey, or encounters a failure, it appends a timestamped line to a plain-text log file. The log requires no configuration — it is always on, always append-only, and located in a predictable place under your Windows user profile. If the app is not behaving as expected, the log is the first place to look.

Log File Location

The log is written to your Windows local application data folder:
%LocalAppData%\PreventScreenSaver\log.txt
On a typical installation this expands to:
C:\Users\<YourUsername>\AppData\Local\PreventScreenSaver\log.txt
The PreventScreenSaver directory is created automatically the first time the app writes a log entry — you do not need to create it manually.

Log Format

Each line in the log follows a fixed structure:
<timestamp> <message>
The timestamp uses the format yyyy-MM-dd HH:mm:ss zzz, where zzz is the UTC offset of your local timezone. This makes log entries unambiguous across daylight saving time transitions and across machines in different time zones. A representative log file looks like this:
2024-06-01 09:00:01 +00:00 Hotkey registered: Ctrl+Alt+P.
2024-06-01 09:00:01 +00:00 Protection activated.
2024-06-01 09:15:32 +00:00 Hotkey pressed.
2024-06-01 09:15:32 +00:00 Protection deactivated.
2024-06-01 09:30:00 +00:00 Application exit requested.

Events That Are Logged

The table below lists every message the app can write, grouped by category.
Event messageWhen it appears
Hotkey registered: <preset name>.A global hotkey preset was successfully registered on startup.
Hotkey registration failed for <preset name>: <error message>Registration failed — another application may already hold that key combination. The error message from the failed registration attempt is included to aid diagnosis.
Hotkey enabled.The user turned the hotkey on from the tray menu.
Hotkey disabled.The user turned the hotkey off from the tray menu.
Hotkey preset selected: <name>.The user selected a hotkey preset while the hotkey is enabled.
Hotkey preset selected (disabled): <name>.The user selected a hotkey preset while the hotkey is disabled.
Hotkey pressed.The global shortcut was activated by the user.
Protection activated.SetThreadExecutionState succeeded and protection is now active.
Protection deactivated.Protection was explicitly stopped. Normal Windows idle behaviour has resumed.
Activation failed.SetThreadExecutionState returned 0. The app remains inactive.
Startup protection restore failed.The app tried to restore the last active state on launch but StartProtection() failed.
Start with Windows enabled.The current-user Run registry key was written successfully.
Start with Windows disabled.The current-user Run registry key was removed.
Start with Windows update failed: <error>The registry write or delete for the current-user Run key failed. The exception message is appended.
Startup state read failed: <error>The app could not read the startup registration state from the registry. The exception message is appended.
Application exit requested.The user selected Exit from the tray menu or a session-ending event was received.
Activation failed. and Startup protection restore failed. both indicate that the underlying SetThreadExecutionState Windows API call returned 0. If you see either of these, check that the application has not been blocked by a security policy and that the process is running under a normal user session.

How to Open the Log

1

Open File Explorer

Press Win + E to open File Explorer, or click the folder icon in your taskbar.
2

Navigate to the log directory

Click the address bar at the top of File Explorer, type %LocalAppData%\PreventScreenSaver, and press Enter. Windows will resolve the environment variable and take you directly to the folder.
3

Open log.txt

Double-click log.txt to open it in Notepad, or right-click and choose Open with to use a different text editor such as Notepad++, VS Code, or any editor you prefer.
Alternatively, open the log in one step from PowerShell:
notepad "$env:LOCALAPPDATA\PreventScreenSaver\log.txt"
The log file is append-only — the app never truncates or rotates it automatically. If it grows large over time, you can delete the file or clear its contents manually. The app will recreate log.txt on the next write, so there is no need to recreate the file or directory yourself.

Build docs developers (and LLMs) love