Hi,
I am executing a small .VBS (setpassword.vbs), to set the user password of a user in AD:
Set objUser = GetObject("LDAP://xx.xx.xx.xxx:389/cn=test,cn=users,dc=xxx,dc=com")
objUser.SetPassword "xxxxxxx"
Then in my .au3, I have:
#RequireAdmin
$return = RunWait('cscript.exe ".\setpassword.vbs"')
ToolTip("Reset the user password!")
Sleep(2000)
That works, but now, I need to add some error handling. I am checking the @error and also the $return, after the RunWait(), but that seems to be 0, regardless of whether or not the .vbs ran with or without error!
Is there a way to check whether or not the .VBS ran ok or not?
Also, FYI, I am aware of the AD UDF, but up to now, I have tried this way because I wasn't really clear about how to do it using the AD UDF, so if someone could provide a small snippet for setting the AD user password using the AD UDF, I would actually prefer to do it that way and avoid the .vbs?
Thanks,
JIm