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 is built on .NET 10 Windows Forms and targets the net10.0-windows framework. The source compiles into a single self-contained Windows executable, and the optional installer is packaged with Inno Setup 6. This page walks through every step from cloning the repository to producing both distributable artifacts.

Requirements

Windows

Required for both building and running the application. The project targets Windows-only APIs including SetThreadExecutionState and RegisterHotKey.

.NET SDK 10+

The project file specifies net10.0-windows as its target framework. Download the SDK from dot.net.

Inno Setup 6

Optional — only needed to produce the installer .exe. Download from jrsoftware.org.

Clone and Build

Clone the repository from GitHub, then build the solution file to confirm everything compiles correctly.
git clone https://github.com/proteo5/Prevent-Screen-Saver.git
cd Prevent-Screen-Saver
dotnet build Prevent-Screen-Saver.slnx
The solution file Prevent-Screen-Saver.slnx is at the repository root and references the single project at src/PreventScreenSaver/PreventScreenSaver.csproj.

Run in Development

To launch the application directly from source during development, use dotnet run with an explicit project path:
dotnet run --project src/PreventScreenSaver/PreventScreenSaver.csproj
The app will start minimized to the system tray by default (controlled by the StartMinimized setting). Left-click the tray icon to toggle protection state, or right-click to open the context menu.

Publish Portable Package

The portable release is a self-contained win-x64 publish that bundles the .NET runtime — no installation required on the target machine. After publishing, compress the output into a ZIP archive:
dotnet publish src/PreventScreenSaver/PreventScreenSaver.csproj `
    -c Release `
    -r win-x64 `
    --self-contained true `
    -o artifacts/publish/win-x64

Compress-Archive `
    -Path artifacts/publish/win-x64/* `
    -DestinationPath artifacts/PreventScreenSaver-win-x64.zip `
    -Force
Output: artifacts/PreventScreenSaver-win-x64.zip This ZIP is the portable artifact published to GitHub Releases alongside the installer.

Build Installer (Inno Setup)

The installer is defined in installer/PreventScreenSaver.iss and compiled with the Inno Setup command-line compiler ISCC.exe.
The publish step above must be run before building the installer. The Inno Setup script sources all application files directly from artifacts/publish/win-x64/ — if that directory is missing or stale, the installer build will fail or bundle an outdated binary.
After publishing, compile the installer with:
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" installer\PreventScreenSaver.iss
Output: artifacts/installer/PreventScreenSaver-Setup-x64.exe

Installer Metadata

The following properties are defined at the top of installer/PreventScreenSaver.iss:
PropertyValue
App namePrevent Screen Saver
Version0.2.0
PublisherAlfredo Pinto Molina
Compressionlzma2 (solid compression enabled)
Privileges requiredlowest — no administrator rights needed
Architectures allowedx64compatible
Default install directory{autopf}\Prevent Screen Saver
Installer output filePreventScreenSaver-Setup-x64.exe
Because PrivilegesRequired=lowest, users can install the application without elevation. The installer writes to the user’s program files folder and does not modify system-wide registry keys.
The installer optionally creates a desktop shortcut (unchecked by default) and offers to launch the app immediately after installation completes.

Build Summary

1

Clone the repository

git clone https://github.com/proteo5/Prevent-Screen-Saver.git
cd Prevent-Screen-Saver
2

Build the solution

dotnet build Prevent-Screen-Saver.slnx
3

Publish the self-contained binary

dotnet publish src/PreventScreenSaver/PreventScreenSaver.csproj -c Release -r win-x64 --self-contained true -o artifacts/publish/win-x64
4

Create the portable ZIP

Compress-Archive -Path artifacts/publish/win-x64/* -DestinationPath artifacts/PreventScreenSaver-win-x64.zip -Force
5

Compile the installer (optional)

"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" installer\PreventScreenSaver.iss

Build docs developers (and LLMs) love