I'm having a heck of time finding out how to code a some 'set' commands from
vbs:
[snippet - what .net does]
objFSO = CreateObject("Scripting.FileSystemObject")
objOut = CreateObject("Scripting.FileSystemObject")
objOut2 = CreateObject("Scripting.FileSystemObject")
objTextFile = objFSO.OpenTextFile(strFile, ForReading, True)
objErrFile = objFSO.OpenTextFile(strErr, ForWriting, True)
objRptFile = objFSO.OpenTextFile(strRpt, ForWriting, True)
objRootDSE = GetObject("LDAP://RootDSE")
strDNSDomain = objRootDSE.Get("DefaultNamingContext")
objRootLDAP = GetObject("LDAP://RootDSE")
objOU = GetObject(LDAP://..ldap string..)
[snippet - from vbs]
set objFSO = CreateObject("Scripting.FileSystemObject")
set objOut = CreateObject("Scripting.FileSystemObject")
set objOut2 = CreateObject("Scripting.FileSystemObject")
set objTextFile = objFSO.OpenTextFile(strFile, ForReading, True)
set objErrFile = objFSO.OpenTextFile(strErr, ForWriting, True)
set objRptFile = objFSO.OpenTextFile(strRpt, ForWriting, True)
set objRootDSE = GetObject("LDAP://RootDSE")
strDNSDomain = objRootDSE.Get("DefaultNamingContext")
set objRootLDAP = GetObject("LDAP://RootDSE")
set objOU = GetObject(LDAP://..ldap string..)
Some of the assignments appear to work, RootDSE and DefaultNamingContext
variables have the correct values. .Net will not accept a "set" at the
beginning of the line, simply erases it. When control passes to the last
line of code above, an error "cannot create activex component" is thrown,
and the object has no value. Any ideas on what I've overlooked or left out?
Had no special includes or anything in the original program
thx
Bill