powaking Posted September 18, 2007 Posted September 18, 2007 Trying to get this autoit script to authenticate a password and group member in WinPE 2.0 (VistaPE)$oMyError = ObjEvent("AutoIt.Error", "ComError")$username = Inputbox("Username",'Enter your username',"","",200,100,-1,-1)$password = Inputbox("Password",'Enter your password',"","*M",200,100,-1,-1)$domain = ""$group = ""If Uservalidate($domain, $username, $password, $group) = 0 then MsgBox(16 + 262144, "Error", "Try again", 8)EndIfFunc UserValidate($Domain, $UserName, $Password, $InGroup = "") Local $NameSpace = ObjGet("WinNT:") Local $ADS_SECURE_AUTHENTICATION = 0x0001 Local $DomObj = $NameSpace.OpenDSObject ("WinNT//" & $Domain, $UserName, $Password, $ADS_SECURE_AUTHENTICATION) If @error <> 0 Then Return 0 Return 1EndFunc ;==>UserValidateFunc ComError() If IsObj($oMyError) Then $HexNumber = Hex($oMyError.number, 8) SetError($HexNumber) Else SetError(1) EndIfEndFunc ;==>ComErrorKeep getting errors on ObjGet command.Before I pull my hair out is this even possible in WinPE2.0 environment? Am I wasting my time? Is there another method?
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