CoffeeBean PolarGoose
winget install --id=PolarGoose.CoffeeBean -e
A tray icon utility to prevent a policy-enforced screen lock in Windows.
README
CoffeeBean
A utility to prevent a policy-enforced screen lock in Windows. Windows can be configured to lock the screen after some time of inactivity. In case corporate IT policies enforce this option, it is impossible to disable it via Windows settings. This utility is a convenient and reliable way to solve this problem.
System requirements
- Windows 7 x32/x64 or higher (you might need to install .Net Framework 4.6.2)
How to install
- Download
CoffeeBean.exe.zip
(portable executable) orCoffeeBean.msi
from the latest release - Run the installer if you want to install the application. The installer will install into a
%AppData%\CoffeeBean
folder and create a desktop icon.
How to use
- Start the application, and you will get an icon in the system tray
- As you keep this tool running, it prevents the screen from auto-locking
- You can still lock the screen manually, if you want, by using Windows default methods/shortcuts (for example, by pressing
Win+L
) - To close the utility, click
Close
in the tray icon context menu. After the utility is closed, the locking behavior returns to what it was before you started the utility - Use the
Launch at startup
context menu item if you want the application to run at Windows startup. - Use the
Enable
context menu item to turn the screen lock prevention functionality on or off.
Running the application from console
There are command line arguments to control screen lock functionality. You can use them in the following way:
- Launch the application with screen lock prevention functionality enabled or enable the screen lock prevention functionality of an already running instance of the application:
CoffeeBean.exe enable
- Launch the application with screen lock prevention functionality disabled or turn off screen lock functionality of an already running instance of the application:
CoffeeBean.exe disable
How it works
The application uses SetThreadExecutionState WinAPI method, which allows an application to keep the system "in use" even if there is no user activity. It is better than simulating key presses or mouse movements. For instance, it is the function that video players use to keep the screen on while playing a video.
How to build
- Use
Visual Studio 2022
with Wix Toolset Visual Studio 2022 Extension and Wix Toolset - Run
github/workflows/build.ps1
to build a release (to run this scriptgit.exe
should be in your PATH)