Sign in to follow this  
Followers 0
EndFunc

Change to Autoit

4 posts in this topic

#1 ·  Posted (edited)

I am trying to convert this ADSI type code to autoit but getting undefined function.

usr.Put "pwdLastSet", CLng(0)

usr.SetInfo

This is the code I tried.

$UserObj.Put ("pwdLastSet", CLng(0))
$UserObj.SetInfo

The setinfo part should be right but the I don't know the correct syntax for the first part.

Edited by EndFunc

EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites



I think, you should replace CLng(0) with 0. CLng converts a variable to a long-type. I think, in AutoIt this is not necessary.


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

Put could also be a reference to a property, and not a real function. If replacing the CLng(0) with 0 isn't enough, try $UserObj.pwdLastSet = 0

Share this post


Link to post
Share on other sites

I think, you should replace CLng(0) with 0. CLng converts a variable to a long-type. I think, in AutoIt this is not necessary.

Awesome, that worked. Thanks all


EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0