Custom CTRL ALT DEL screen backend (Not a proper dialog)
Apr 23, 2023 17:18:25 GMT -8
Post by ihatemetro on Apr 23, 2023 17:18:25 GMT -8
This is just a general backend that can be used for developing custom graphical CTRL ALT DEL screens (Windows Security dialog), making it easier to develop CTRL ALT DEL screens that can look like Windows 2000/XP (XP without fast user switching), Vista, 7, or even 8. It works similar to Classic Logon Shell, by simulating keystrokes (except for the utilman function). It works with both the gui CTRL ALT DEL and the console login variant. It takes arguments and is written in AutoHotKey (v2). It works only if your CTRL ALT DEL screen is running in Winsta0\Winlogon, also known as the login screen session, which makes it so that you can press CTRL ALT DEL to bring up the custom dialog instead of needing a different key combination like CTRL ALT END or whatever. This backend SHOULD work down to Vista, though I have not actually tested it on anything lower than 10.
To use it, just execute the program using your programming language's way or executing other programs (eg. system() for C, CreateProcess() for C++, or Process.Start() for C#) with arguments.
To use it, just execute the program using your programming language's way or executing other programs (eg. system() for C, CreateProcess() for C++, or Process.Start() for C#) with arguments.
Also, to run your CTRL ALT DEL screen on Winsta0\Winlogon, you can use logon screen launcher.
Here is an example entry for LogonScreenLauncher with the demo script:
<application path="C:\ctrlaltdelbackenddemo.cmd">
<start service_start="false" service_stop="false" logon="true" logoff="false" display_lock="false" display_unlock="true" />
<stop service_start="false" service_stop="false" logon="false" logoff="true" display_lock="true" display_unlock="false" />
</application>
<start service_start="false" service_stop="false" logon="true" logoff="false" display_lock="false" display_unlock="true" />
<stop service_start="false" service_stop="false" logon="false" logoff="true" display_lock="true" display_unlock="false" />
</application>
You can change the path to where your program is located, but make sure not to change the "start" or "stop" options at all (including what's inside the brackets), as those make the custom CTRL ALT DEL screen display properly.
Features (v1):
- Detection if an account is linked to a MS account or not (as the change password option is removed with one linked)
- Supports clicking all CTRL ALT DEL screen items
- Supports opening utilman.exe (even in console logon mode, it's actually very simple)
- Has arguments: changepw (opens change password dialog, throws a prompt when current account is MS), lock (clicks lock in CTRL ALT DEL screen), signout (clicks sign out in CTRL ALT DEL screen), switchuser (clicks switch user in CTRL ALT DEL screen), taskmgr (clicks task manager in CTRL ALT DEL screen), exit (Clicks cancel in CTRL ALT DEL screen), and utilman (opens utilman.exe).
- Unlike Classic Logon Shell, no dependencies on metro components (as it supports console login).
- Unlike Classic Logon Shell, no dependencies on metro components (as it supports console login).
Features (v2):
- All from v1
- Can change passwords. Quote from the help page on how to use it: "Argument options are: (options) (oldpassword) (newpassword). Oldpassword and newpassword are only used when the changepw option is used. Otherwise, they are ignored. If (oldornew) is specified, this means that only one password will be put in, either as the old password or the new password. The third argument (newpassword) will be ignored, but it has to be specified as something other than blank, or else the value of (oldornew) becomes the new password. If (oldornew) is 0, then it is the old password. If it is 1, then it is the new password."
- Now fully supports GUI login screens
- Supports opening network dialog (may not work without startisback)
- Adds shutdown argument, restart argument, and hibernate argument. They do exactly what you think they do. No support for sleep.
Known Issues:
- Will not work with certain group policy options that disable options on the CTRL ALT DEL screen
- May expose passwords in arguments (No fix)
Here is the source and a compiled version, as well as the demo batch file (cmd file). They are all in a zip file. The demo batch file uses the EXE version. If you are paranoid that my compiled version may contain malware or spyware (it doesn't), feel free to compile it yourself. You could also change the demo batch file to point to the ahk version if you have AutoHotKey version 2 installed. I may move them from attachments to somewhere else later. I also can't use the spoiler tag so it's posted as an AHK file. I am quite new at AutoHotKey so feel free to suggest improvements.