Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


  • Content count

  • Donations

  • Joined

  • Last visited

Community Reputation

0 Neutral

About shawn_wall

  1. LDAP in Win PE 2.0

    I'm having an issue getting ADO to work correctly under Windows PE 2.0, I've added the files above modified the software hive and still can't get this to work. What I'm trying to do is run a query against a AD server to determine if a computer account exists in the directory. And even after following the steps above I'm still getting a "ActiveX component can't create object: 'ADOBD.Connection'". I've also noticed that if I try to regsvr32 the added DLL's I get a "The module <dllname>.dll was loaded but the entry-point DllRegisterServer was not found". I'm including the script I'm working on assuming that it's something I messed up as other people have gotten this working. Many thanks in advance Shawn Set args = WScript.Arguments If Wscript.Arguments.Count = 0 Then Wscript.echo "No server name supplied" Wscript.Quit 2 End If strCompName = args.Item(0) Set conn = CreateObject("ADODB.Connection") Set cmd = CreateObject("ADODB.Command") conn.provider = "adsdsoobject" Conn.Properties("User ID") = "<Serviceacct>" Conn.Properties("Password") = "<Password>" Conn.Properties("Encrypt Password") = TRUE Conn.Properties("ADSI Flag") = 3 conn.open "Active Directory Provider" Set cmd.activeconnection = conn cmd.commandtext = "<LDAP://hqdc01.nvidia.com/DC=nvidia,DC=com>;(&(objectcategory=computer)(objectclass=computer)(cn=" & strCompName & "));cn;subtree" Set rs = cmd.Execute If rs.recordcount <> 0 Then Wscript.echo "Server already exists in the domain" Wscript.Quit 1 End If