Simple open-source program to lock the Windows Desktop screen with advanced options:
- Disables the desktop while the lock window is active
- Prevents normal system use
- Only unlocks with a password set by the administrator
Run the program with the parameter:
/GenerateHash
or/gh
Example:
MyLogin.exe /GenerateHash
Important
Once executed, follow the instructions until you get the generated hash (e.g., 0x9461E4B1394C6134483668F09CCF7B93
)
๐ Save it; it will be your "encrypted" password; we'll use it to start the program.
Use your hash to start the program:
/PassHash
or/ph
Example:
MyLogin.exe /PassHash 0x9461E4B1394C6134483668F09CCF7B93
This hash is the password you entered earlier in plain text but encrypted.
- If you haven't generated a hash, you won't be able to access the program, as it is required to unlock it.
- The password you must use to unlock it is the original one (the one you entered when creating the hash), not the encrypted hash.
Also check out this new feature: config.ini
Note
๐ง The following parameters are optional; they are not required.
-
/DisableExplorer
or/de
With this parameter, you can temporarily disable Windows Explorer, preventing the taskbar, desktop icons, and the ability to open the Start menu.
For added security, it is enabled by default since v2.5
-
/DisablePowerOff
or/dp
With this parameter, you can disable the Power Off button (available since v1.1)
-
/DisableReboot
or/dr
With this parameter, you can disable the Restart button (available since v1.1)
-
/DisableLockSession
or/dl
With this parameter, you can disable the Lock Session button (available since v2.0)
-
/DisableBlur
or/db
With this parameter, you can disable the screen blur (available since v2.8)
-
/DisableSound
or/ds
With this parameter, you can turn off the sounds emitted (available since v3.7)
-
/Style
or/st
With this parameter, you can change the layout (0=Default White, 1=Dark, 2=Light Blue)
Example, enable dark mode:
MyLogin.exe /PassHash 0x9461E4B1394C6134483668F09CCF7B93 /Style 1
-
/AutoUpdater
or/au
With this parameter, you enable automatic updates every time the program starts, once the package is downloaded, it is installed on the next start. (available since v2.2)
Example with all options:
MyLogin.exe /ph 0x9461E4B1394C6134483668F09CCF7B93 /dp /dr /dl /st 1 /au
โ๏ธ Archive config.ini
Warning
Since version 3.0, a function has been added to read parameters from a file called config.ini
. This file allows you to configure settings more easily and conveniently, avoiding having to enter them manually via the command line.
- Optional: If you prefer, you can continue using parameters via the command line without any problem, ignoring this file.
- The file structure is as follows:
[config]
PassHash =
DisableExplorer = True
DisablePowerOff = False
DisableReboot = False
DisableLockSession = False
DisableBlur = False
DisableSound = False
Style = 0
AutoUpdater = False
You have two options:
- Portable
- Inno Setup
Since version 3.0, a simpler installation system has been included, supporting both manual and unattended modes. You can use these parameters to install the program quickly and quietly. It also features a multilingual interface.
Go to the Releases section where the latest compiled versions will be available.
You have several methods to auto-run
, choose one of them:
# | Method | Process | Difficulty | Speed | Recommended | Hidden |
---|---|---|---|---|---|---|
1 | Winlogon | Regedit | High | Fast | โ๏ธ | โ๏ธ |
2 | Logon Scripts | Gpedit | Medium | Medium | โ๏ธ | โ๏ธ |
3 | Run StartUp | Windows | Low | Medium | โ๏ธ | โ |
4 | Scheduled Task | Windows | Low | Slow | โ | โ |
- Winlogon:
This is one of the fastest ways to start a program, as it runs immediately after the user logs on, right after the desktop is displayed.
- Open
regedit
- Go to
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
- Modify the
Shell
key:
Example:
explorer.exe, "C:\myLogin.exe" /PassHash 0x9461E4B1394C6134483668F09CCF7B93
- Logon Scripts:
- Open
gpedit.msc
- Go to ->
Config. User -> Config. Windows -> Script -> Login -> Add
- Script name:
C:\myLogin.exe
- Script parameters:
/ph 0x9461E4B1394C6134483668F09CCF7B93
- OK
- Apply and OK
- Run StartUp:
- Create a shortcut in:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
Whose properties would look like this: C:\myLogin.exe /ph 0x9461E4B1394C6134483668F09CCF7B93
- Scheduled Task:
- This method may take a while depending on the number of processes and tasks in the queue, so I don't recommend it. If you still decide to use it, follow these steps:
- Open
cmd
- Enter
schtasks /create /tn "myLogin" /tr "\"C:\myLogin.exe\" /ph 0x9461E4B1394C6134483668F09CCF7B93" /sc onlogon
- And press ENTER.
- Once created, it should run every time the user logs in.
If you want to delete the task, enter the command: schtasks /delete /tn "myLogin" /f
Tip
For maximum security, use the "Hidden" methods (Winlogon or Scripts) that prevent others from easily deactivating the program.
You can use the CMD file, which requires having AutoIt3 installed with Aut2Exe.
Starting with version 1.5, you can contribute to adding support for languages not yet available. The files are located in the lang/ folder. This is the list of supported languages; currently, only English=EN and Spanish=ES are loaded.
Of course, all suggestions are welcome ;)
Caution
To report any Bug
๐ท๏ธ create an Issues with your problem details!