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.

Prevent Screen Saver remembers your preferences between sessions using a small JSON settings file. When the app starts, it reads this file to decide whether to show the main window, whether to re-activate protection automatically, and which hotkey to register. All changes are written to disk automatically — there is no Save button.

Settings File Location

The settings file is stored in your Windows user profile’s local application data folder:
%LocalAppData%\PreventScreenSaver\settings.json
On a typical Windows installation this resolves to a path such as C:\Users\YourName\AppData\Local\PreventScreenSaver\settings.json. The directory is created automatically the first time settings are saved.

Full Settings Structure

settings.json
{
  "StartMinimized": true,
  "LastProtectionActive": false,
  "HotkeyEnabled": true,
  "HotkeyPresetId": "ctrl-alt-p"
}
Settings are written automatically every time a value changes — for example, when you toggle protection, enable the hotkey, or change the startup registration. You never need to manually save.

Start with Windows

Enabling Start with Windows makes Prevent Screen Saver launch automatically each time you sign in to Windows.
1

Right-click the tray icon

Open the context menu by right-clicking the tray icon.
2

Click Start with Windows

The menu item is a checked toggle. Clicking it enables or disables the startup registration:
  • Checked — the app will launch at sign-in.
  • Unchecked — the app will not launch automatically.
Enabling Start with Windows writes a string value to the Windows registry under:
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
The value name is PreventScreenSaver and the stored data is the full quoted path to the executable, for example:
"C:\Program Files\PreventScreenSaver\PreventScreenSaver.exe"
Disabling Start with Windows deletes this value. Because the key lives under HKCU (the current user hive), no administrator rights are required.
The stored registry path is always the full quoted path to PreventScreenSaver.exe. If you move the application to a different folder after enabling startup, disable and re-enable Start with Windows to update the path.

Start Minimized

SettingDefaultDescription
StartMinimizedtrueWhen true, the app starts hidden in the system tray without displaying the main window.
With Start Minimized set to true (the default), launching the app — whether manually or via the Start with Windows registry entry — places it directly into the tray. The main window is never shown until you explicitly open it via Tray > Open. Setting StartMinimized to false causes the main window to appear on screen when the app launches.
If you enable Start with Windows, leave Start Minimized at its default of true. This keeps the startup experience unobtrusive — the app is ready in the tray without interrupting your sign-in workflow.

Last Protection Active

SettingDefaultDescription
LastProtectionActivefalseWhen true at startup, the app attempts to re-activate protection automatically.
If LastProtectionActive is true when the app starts, it immediately calls StartProtection() to restore the previous active state. This means if you were running with protection active when you last used the app, it will be active again the next time the app launches — without any manual interaction.
1

App starts and reads settings

The settings file is loaded before the main form is displayed.
2

Protection state is checked

If LastProtectionActive is true, the app calls StartProtection().
3

Success or failure is handled

  • Success — the tray icon switches to the Active state immediately.
  • Failure — a log entry is written ("Startup protection restore failed."). The app continues normally in the Idle state; no error dialog is shown at startup.

How LastProtectionActive Is Maintained

The app keeps this value accurate automatically:
  • Set to true whenever protection is activated (via tray, hotkey, or main window button).
  • Set to false whenever protection is deactivated.
  • Set to false on a clean exit — protection always stops when you choose Tray > Exit, and the setting is updated before the app closes.
On a clean exit, the app explicitly saves LastProtectionActive = false to disk before closing. This ensures that restarting the app after a normal exit begins in the Idle state, which is the safe default.

Settings Reference

SettingTypeDefaultDescription
StartMinimizedbooltrueHide the main window on launch; show only the tray icon.
LastProtectionActiveboolfalseRe-activate protection automatically on the next launch.
HotkeyEnabledbooltrueRegister the global hotkey at startup.
HotkeyPresetIdstringctrl-alt-pThe key combination preset to use for the hotkey.
For details on the hotkey settings, see the Hotkeys guide.

Build docs developers (and LLMs) love