Jump to content

COM Object Issue


Recommended Posts

Another problem with another script

$objUser = ObjGet("WinNT://" & @ComputerName & "/Matthew, user")
MsgBox(0, "test", $objUser)
;;need to fix .SetPassword
With $objUser
    .SetPassword = "testpassword"
    .SetInfo
EndWith

Errors on .SetPassword = ...

Error function says "Member not found."

<{POST_SNAPBACK}>

That is because you are NOT working with a user-object. Also .SetPassword is not a property, but it's a Method. See also: http://www.microsoft.com/technet/scriptcen...04/hey1015.mspx

The working code should be:

$objUser = ObjGet("WinNT://" & @ComputerName & "/Matthew")
MsgBox(0, "test", $objUser)

With $objUser
    .SetPassword("testpassword")
    .SetInfo
EndWith

I also want to point out that, when working with COM in AutoIt, most issues are not AutoIt-related. The best resources for help are VBscript examples. For many of these examples see Microsoft's Script Center: http://www.microsoft.com/technet/scriptcenter/default.mspx

Regards,

-Sven

Link to comment
Share on other sites

Ok, thanks. I'm not quite fond of COM, in fact, this is the first time I've actually had to deal with it.

Any suggestions on reading material, online or print?

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Link to comment
Share on other sites

FINALLY....It works!!!

"Stupid Me" was at fault again. I had figured that DL and installing the latest Beta would overwrite the old...NOT...I was trying all of my ADSI Interface calls using version 3.1.1.7...

So I deleted/uninstalled everything and only installed 3.1.1.37...Now I need to figure out how the GUI stuff changed since one of my projects isn't working now.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...