fcjoe Posted December 9, 2010 Share Posted December 9, 2010 Function IsAccountDisabled(intUAC) Const ADS_UF_ACCOUNTDISABLE = 2 If intUAC And ADS_UF_ACCOUNTDISABLE Then IsAccountDisabled = True Else IsAccountDisabled = False End If End Function I have a VBScript that I'm converting to AutoIT. What it does is query Active Directory for all accounts and doesn't count the ones that are disabled. The function in VBScript to to determine if it is disabled is below ' Function to perform an AND comparison against the AD field UserAccountControl to determine if the account is disabled Function IsAccountDisabled(intUAC) Const ADS_UF_ACCOUNTDISABLE = 2 If intUAC And ADS_UF_ACCOUNTDISABLE Then IsAccountDisabled = True Else IsAccountDisabled = False End If End Function It will return True is the account is disabled. However, VBScript and Autoit treet 'AND' differently. Does anyone know how to get this to work in AutoIt? Thank you, Joe Link to comment Share on other sites More sharing options...
Richard Robertson Posted December 9, 2010 Share Posted December 9, 2010 BitAnd($intUAC, $ADS_UF_ACCOUNTDISABLE) Link to comment Share on other sites More sharing options...
fcjoe Posted December 10, 2010 Author Share Posted December 10, 2010 That was simple, I feel stupid. Thank you, Joe BitAnd($intUAC, $ADS_UF_ACCOUNTDISABLE) 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