WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

234 Unable to Parse ADSI Path on WinPE


Question:

This code is working OK, when a Windows 2000 Professional computer is a member of the Active directory 2003 domain (test.dom.company.com), but i recieve the error 234, when a computer is not a member of the domain (WinPE, Windows Preinstalled Environment 2004). Anyone an idea how to resolve this without adding the WinPE machine to the domain?

This code replaces a computer account from one Active Directory OU to: \test.dom.company.com\RIS Computers\

AddExtender("wwads34I.dll")

logonserver="d-pdcsrv"
computername="pcdtnws293"

dsSetCredentx("userid@test.dom.company.com", "password",1|256)
lpath = dsFindPath("LDAP://%logonserver%","CN=%computername%")
RISComputerOU = "LDAP://%logonserver%/OU=RIS Computers,DC=test,DC=dom,DC=company,DC=com"
RISComputerPath = "LDAP://%logonserver%/CN=%computername%,OU=RIS Computers,DC=test,DC=dom,DC=company,DC=com"

sNewPath = dsMoveObj(lpath, RISComputerOU, "CN=%computername%") 
Display(3,"%computername%", sNewPath)

Answer:

This is only a guess but your problem may be with WinPE and not domain membership. Generally, you can connect to an AD server from a non-domain computer if you use valid credentials and include a server name in your ADSI path.

The extender uses OS functionality to validate and parse ADSI paths. If memory servers, that functionality is not part of the main ADSI dll but in one of the axillary ADSI dlls. It is possible that your WinPE does not have the dll installed.

You may be able to work around this by using WB's COM sub-system to perform your AD tasks.

Here is a simple example to try

; Get the LDAP object.
objLdap = ObjectGet("LDAP:")

; Get the container object
objContainer = objLdap.OpenDSObject("LDAP://shamrock/OU=Test Org Unit,DC=jclass,DC=org","me@jclass.org", "*topsecret*",  1)

; Move it
objComputer = objContainer.MoveHere("LDAP://shamrock/CN=TestComputer,CN=Computers,DC=jclass,DC=org", "CN=Computers")
Message("Computer path", objComputer.AdsPath)

; Clean up
objComputer  = 0
objContainer = 0
objLdap      = 0

User Reply:

Solution: place the next components in WinPE (2004):
/i386/system32/*.* activeds.tlb
adsiis51.dll
adsldp.dll
adsldpc.dll
adsmsext.dll
adsnds.dll
adsnt.dll
adsnw.dll
rassapi.dll
You can get them from the Windows XP SP2 cd or computer.

Article ID:   W16787
File Created: 2007:07:03:14:26:16
Last Updated: 2007:07:03:14:26:16