I have a simply form which i am testing to see if i can get some vb code working.
the form has three fields, fname, sname, username, and a button with custom code as
dim sFirstname, sSurname, sUsername
sFirstname = XDocument.DOM.selectSingleNode("//my:myFields/my:firstname").text
sSurname = XDocument.DOM.selectSingleNode("//my:myFields/my:surname").text
sUsername = XDocument.DOM.selectSingleNode("//my:myFields/my:username").text
msgbox " Checking for " & sfirstname & " " & sSurname
'Setup Active Directory Connection Properties
Set conn = CreateObject("ADODB.Connection")
conn.Provider = "ADSDSOObject"
conn.Open "ADs Provider"
sLdap = "<LDAP://dc=siemensfinancialservices,dc=co,dc=uk>;(&(objectCategory=User)(distinguishedName=*)(samAccountName=" & sUsername & "));distinguishedName;subtree"
Set rs = conn.Execute(sLdap)
If rs.RecordCount = 0 Then
Msgbox "Username: " & sUserName & " does not exist."
Else
sUserDN = rs.fields("distinguishedName")
Msgbox DomainContainer
Set oUser = GetObject("LDAP://" & sUserDN)
oUser.msExchHideFromAddressLists = True
oUser.userAccountControl = "514"
oUser.SetInfo
If oUser.userAccountControl = "514" Then
sAS = "Disabled"
Elseif oUser.userAccessControl = "512" Then
sAS = "Enabled"
End If
Msgbox "User: " & sUserDN & vbcrlf & "Hide From GAL? " & oUser.Get("msExchHideFromAddressLists") & vbcrlf & "Account is: " & sAS
Set oUser = Nothing
End If
conn.close
I receive a an error
ActiveX component cant create object: 'Get Object'
File: script.vbs
Line41 I get this error wheather i publish to sharepoint or to a shared folder.
I have also tried different trusts, such as fully trust, domain and automatically detect.
Please can some one tell me where i am going wrong.
Some information :
http://support.microsoft.com/default.aspx?scid=kb;en-us;832512Thanks