Impulse08 Posted March 22, 2007 Share Posted March 22, 2007 Hi all, Is there anyway to verify that a username and password is valid using Auto-It. I have my users enter a domain\username and password using InputBox, but I wanted to know if there is way to verify this is a valid username and password? Any help would be greatly appreciated. Thanks. -- If the apocalypse comes... beep me. Link to comment Share on other sites More sharing options...
tAKTelapis Posted March 22, 2007 Share Posted March 22, 2007 i can imagine there is a DLL somewhere for ldap authentication. Link to comment Share on other sites More sharing options...
Danny35d Posted March 23, 2007 Share Posted March 23, 2007 $User = InputBox('User', 'Enter User name') $Domain = InputBox('Domain', 'Enter Domain name') $Pass = InputBox('Password', 'Enter Password', '', '*') MsgBox(0, 'Test User Account', _CheckUserPass($User, $Pass, $Domain)) Func _CheckUserPass($sUsername, $sPassword, $sComputerName) Local $iCheck = True Opt("RunErrorsFatal", 0) RunAsSet($sUsername, $sComputerName, $sPassword, 0) Run(@ComSpec & " /c echo checking password...", @TempDir, @SW_HIDE) If @error Then $iCheck = False RunAsSet() Opt("RunErrorsFatal", 1) Return $iCheck EndFunc AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
Impulse08 Posted March 23, 2007 Author Share Posted March 23, 2007 $User = InputBox('User', 'Enter User name') $Domain = InputBox('Domain', 'Enter Domain name') $Pass = InputBox('Password', 'Enter Password', '', '*') MsgBox(0, 'Test User Account', _CheckUserPass($User, $Pass, $Domain)) Func _CheckUserPass($sUsername, $sPassword, $sComputerName) Local $iCheck = True Opt("RunErrorsFatal", 0) RunAsSet($sUsername, $sComputerName, $sPassword, 0) Run(@ComSpec & " /c echo checking password...", @TempDir, @SW_HIDE) If @error Then $iCheck = False RunAsSet() Opt("RunErrorsFatal", 1) Return $iCheck EndFunc This looks pretty nice. Thanks. Now if I am on computer 1, and want to check if the domain\username and password are local admins on computer 2. Is there an AutoIt way? I know there is a VBScript way to do this, but I'd like to keep everything in AutoIt. -- If the apocalypse comes... beep me. Link to comment Share on other sites More sharing options...
Danny35d Posted March 23, 2007 Share Posted March 23, 2007 This looks pretty nice. Thanks.Now if I am on computer 1, and want to check if the domain\username and password are local admins on computer 2. Is there an AutoIt way? I know there is a VBScript way to do this, but I'd like to keep everything in AutoIt.Well autoit support COM is just to convert the vbs script into autoit. AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
Impulse08 Posted March 23, 2007 Author Share Posted March 23, 2007 Well autoit support COM is just to convert the vbs script into autoit.Great! Thanks a lot. This support forum is always full of helpful people. -- If the apocalypse comes... beep me. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now