find if user has password set Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
floppydrive
Posts: 1
Joined: 09 Feb 2019, 14:00

find if user has password set

09 Feb 2019, 14:05

can I use ahk to find out if the system has a password set? it's for Windows 10, I don't need the password, just a check if there is one
Rohwedder
Posts: 7627
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: find if user has password set

10 Feb 2019, 04:30

Hallo,
I only use Windows 7.
Try it. I get a different error message depending on whether a password is set or not.

Code: Select all

q::
	RunAs, %A_UserName%
	Run Notepad.exe
Return
AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

Re: find if user has password set

10 Feb 2019, 05:43

Rohwedder wrote:
10 Feb 2019, 04:30
Hallo,
I only use Windows 7.
Try it. I get a different error message depending on whether a password is set or not.

Code: Select all

q::
	RunAs, %A_UserName%
	Run Notepad.exe
Return
Thank you, what happens if there is no password? Interesting post because you can test many machines fast using a script like this
mast4rwang
Posts: 141
Joined: 19 Jul 2017, 09:59

Re: find if user has password set

10 Feb 2019, 06:32

Mister AHK_hackerman_student xD
Rohwedder
Posts: 7627
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: find if user has password set  Topic is solved

10 Feb 2019, 09:17

Hallo,
this script creates a temporary second script, runs it and copies the contents of the error window.

Code: Select all

FileDelete, ~.ahk ;temporary autohotkey file
FileAppend, RunAs`, %A_UserName%`r`nRun Notepad.exe, ~.ahk
Run, ~.ahk
WinWaitActive, ~.ahk
WinGetText, ErrorText
WinClose
FileDelete, ~.ahk
MsgBox,,This is the ErrorText,% ErrorText
Here, if I have a password set:
(german:)Specifically: Anmeldung fehlgeschlagen: unbekannter Benutzername oder falsches Kennwort.
(translation:)Specifically: login failed: unknown username or wrong password.
Without password:
(german:)Specifically: Anmeldung fehlgeschlagen: Benutzerkontenbeschränkung. Mögliche Ursachen hierfür: leere Kennwörter si...
(translation:)Specifically: Logon failed: User account restriction. Possible reasons for this: Empty passwords si...

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, DiegoSouto, mikeyww, Rohwedder, Sniperman, Swiftly9767 and 374 guests