LDAP in Win PE 2.0
#1
Posted 17 March 2007 - 10:39 PM
http://www.msfn.org/...showtopic=89923
http://www.myitforum...iew.asp?id=8810
And it is interesting to see how it done, maybe someone can script it as an addon.
#2
Posted 18 March 2007 - 01:06 AM
#3
Posted 20 March 2007 - 08:22 AM
WinPE 2.0 is a Vista based Pe, isn't it?
Yes
#4
Posted 03 June 2007 - 07:45 AM
here my 1st try, please test.
Xplod
adsi.script
[codebox][main] Title=ADSI (beta) Type=Script Selected=True Locked=false level=3 Description=Needs Windows Vista DVD as source Author=XPLOD Date=20.03.2007 Version=0001 [process] If,%pCheckBox1%,Equal,true,Run,%ScriptFile%,FileADSI If,ExistFile,"%ScriptDir%\%PName%\ADSI.reg",Run,%ScriptFile%,ADSIsettings [FileADSI] Echo,"Processing ADSI files..." FileCopy,"%InstallSRC%\Windows\System32\adsldp.dll","%TargetDir%\Windows\System32" FileCopy,"%InstallSRC%\Windows\System32\adsnt.dll","%TargetDir%\Windows\System32" FileCopy,"%InstallSRC%\Windows\System32\mscoree.dlll","%TargetDir%\Windows\System32" FileCopy,"%InstallSRC%\Windows\System32\mscorier.dll","%TargetDir%\Windows\System32" FileCopy,"%InstallSRC%\Windows\System32\mscories.dll","%TargetDir%\Windows\System32" [ADSIsettings] Echo,"Applying ADSI Settings ..." If,ExistFile,%RegSoftware%,RegHiveLoad,Tmp_software,%RegSoftware% ShellExecute,"hide","regedit.exe","/s #$q%ScriptDir%\%PName%\ADSI.reg#$q" If,ExistFile,%RegSoftware%,RegHiveUnLoad,"Tmp_software" [Interface] pCheckBox1="Enable ADSI",1,3,10,40,200,18,True pTextLabel1="Select components:",1,1,10,13,230,18,8,Bold pTextLabel2="ALL components reqest Windows Vista DVD as source",1,1,10,153,418,20,8,Bold [/codebox] adsi.reg [codebox]Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\ADs] [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\ADs\Clsid] @="{4753da60-5b71-11cf-b035-00aa006e0975}" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\ADsDSOObject] @="OLE DB Provider for Microsoft Directory Services" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\ADsDSOObject\Clsid] @="{549365d0-ec26-11cf-8310-00aa00b505db}" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\ADsNamespaces] [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\ADsNamespaces\Clsid] @="{233664b0-0367-11cf-abc4-02608c9e7553}" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\ADsSecurityUtility] @="ADs Security Utility Object" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\ADsSecurityUtility\Clsid] @="{f270c64a-ffb8-4ae4-85fe-3a75e5347966}" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\ADSystemInfo] [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\ADSystemInfo\Clsid] @="{50B6327F-AFD1-11d2-9CB9-0000F87A369E}" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{4753da60-5b71-11cf-b035-00aa006e0975}] @="ADs Provider Object" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{4753da60-5b71-11cf-b035-00aa006e0975}\InprocServer32] @="activeds.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{4753da60-5b71-11cf-b035-00aa006e0975}\ProgID] @="ADs" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{4753da60-5b71-11cf-b035-00aa006e0975}\TypeLib] @="{97d25db0-0363-11cf-abc4-02608c9e7553}" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{4753da60-5b71-11cf-b035-00aa006e0975}\Version] @="1.0" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{549365d0-ec26-11cf-8310-00aa00b505db}] @="ADsDSOObject" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{549365d0-ec26-11cf-8310-00aa00b505db}\InprocServer32] @="activeds.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{549365d0-ec26-11cf-8310-00aa00b505db}\OLE DB Provider] @="OLE DB Provider for Microsoft Directory Services" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{549365d0-ec26-11cf-8310-00aa00b505db}\ProgID] @="ADsDSOObject" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{233664b0-0367-11cf-abc4-02608c9e7553}] @="ADs Namespaces Object" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{233664b0-0367-11cf-abc4-02608c9e7553}\InprocServer32] @="activeds.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{233664b0-0367-11cf-abc4-02608c9e7553}\ProgID] @="ADsNamespaces" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{233664b0-0367-11cf-abc4-02608c9e7553}\TypeLib] @="{97d25db0-0363-11cf-abc4-02608c9e7553}" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{233664b0-0367-11cf-abc4-02608c9e7553}\Version] @="1.0" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{f270c64a-ffb8-4ae4-85fe-3a75e5347966}] @="ADs Security Utility Object" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{f270c64a-ffb8-4ae4-85fe-3a75e5347966}\InprocServer32] @="activeds.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{f270c64a-ffb8-4ae4-85fe-3a75e5347966}\ProgID] @="ADsSecurityUtility" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{f270c64a-ffb8-4ae4-85fe-3a75e5347966}\TypeLib] @="{97d25db0-0363-11cf-abc4-02608c9e7553}" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{f270c64a-ffb8-4ae4-85fe-3a75e5347966}\Version] @="1.0" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{50B6327F-AFD1-11d2-9CB9-0000F87A369E}] @="AD System Info Object" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{50B6327F-AFD1-11d2-9CB9-0000F87A369E}\InprocServer32] @="adsldp.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{50B6327F-AFD1-11d2-9CB9-0000F87A369E}\ProgID] @="ADSystemInfo" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{50B6327F-AFD1-11d2-9CB9-0000F87A369E}\TypeLib] @="{97d25db0-0363-11cf-abc4-02608c9e7553}" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{50B6327F-AFD1-11d2-9CB9-0000F87A369E}\Version] @="1.0" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{4de7016c-5ef9-11d1-8c13-00c04fd8d503}] @="Microsoft User Extension" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{4de7016c-5ef9-11d1-8c13-00c04fd8d503}\InprocServer32] @="adsmsext.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{4de7016c-5ef9-11d1-8c13-00c04fd8d503}\ProgID] @="MSExtUser" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{4de7016c-5ef9-11d1-8c13-00c04fd8d503}\TypeLib] @="{97d25db0-0363-11cf-abc4-02608c9e7553}" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{4de7016c-5ef9-11d1-8c13-00c04fd8d503}\Version] @="1.0" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{94a909a5-6f52-11d1-8c18-00c04fd8d503}] @="Microsoft Group Extension" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{94a909a5-6f52-11d1-8c18-00c04fd8d503}\InprocServer32] @="adsmsext.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{94a909a5-6f52-11d1-8c18-00c04fd8d503}\ProgID] @="MSExtGroup" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{94a909a5-6f52-11d1-8c18-00c04fd8d503}\TypeLib] @="{97d25db0-0363-11cf-abc4-02608c9e7553}" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{94a909a5-6f52-11d1-8c18-00c04fd8d503}\Version] @="1.0" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{2dfb3a35-6071-11d1-8c13-00c04fd8d503}] @="Microsoft Locality Extension" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{2dfb3a35-6071-11d1-8c13-00c04fd8d503}\InprocServer32] @="adsmsext.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{2dfb3a35-6071-11d1-8c13-00c04fd8d503}\ProgID] @="MSExtLocality" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{2dfb3a35-6071-11d1-8c13-00c04fd8d503}\TypeLib] @="{97d25db0-0363-11cf-abc4-02608c9e7553}" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{2dfb3a35-6071-11d1-8c13-00c04fd8d503}\Version] @="1.0" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{dccc0bed-6066-11d1-8c13-00c04fd8d503}] @="Microsoft Organization Extension" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{dccc0bed-6066-11d1-8c13-00c04fd8d503}\InprocServer32] @="adsmsext.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{dccc0bed-6066-11d1-8c13-00c04fd8d503}\ProgID] @="MSExtOrganization" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{dccc0bed-6066-11d1-8c13-00c04fd8d503}\TypeLib] @="{97d25db0-0363-11cf-abc4-02608c9e7553}" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{dccc0bed-6066-11d1-8c13-00c04fd8d503}\Version] @="1.0" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{fd8d3a5f-6066-11d1-8c13-00c04fd8d503}] @="Microsoft OrganizationUnit Extension" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{fd8d3a5f-6066-11d1-8c13-00c04fd8d503}\InprocServer32] @="adsmsext.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{fd8d3a5f-6066-11d1-8c13-00c04fd8d503}\ProgID] @="MSExtOrganizationUnit" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{fd8d3a5f-6066-11d1-8c13-00c04fd8d503}\TypeLib] @="{97d25db0-0363-11cf-abc4-02608c9e7553}" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{fd8d3a5f-6066-11d1-8c13-00c04fd8d503}\Version]@="1.0"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{9f37f39c-6f49-11d1-8c18-00c04fd8d503}]@="Microsoft PrintQueue Extension"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{9f37f39c-6f49-11d1-8c18-00c04fd8d503}\InprocServer32]@="adsmsext.dll""ThreadingModel"="Both"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{9f37f39c-6f49-11d1-8c18-00c04fd8d503}\ProgID]@="MSExtPrintQueue"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{9f37f39c-6f49-11d1-8c18-00c04fd8d503}\TypeLib]@="{97d25db0-0363-11cf-abc4-02608c9e7553}"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{9f37f39c-6f49-11d1-8c18-00c04fd8d503}\Version]@="1.0"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\TypeLib\{97d25db0-0363-11cf-abc4-02608c9e7553}][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\TypeLib\{97d25db0-0363-11cf-abc4-02608c9e7553}\1.0]@="Active DS Type Library"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\TypeLib\{97d25db0-0363-11cf-abc4-02608c9e7553}\1.0][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\TypeLib\{97d25db0-0363-11cf-abc4-02608c9e7553}\1.0\win32]@=hex(2):43,00,3a,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,5c,00,73,\00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,61,00,63,00,74,00,69,00,\76,00,65,00,64,00,73,00,2e,00,74,00,6c,00,62,00,00,00[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\TypeLib\{97d25db0-0363-11cf-abc4-02608c9e7553}\1.0\FLAGS]@="0"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{228D9A81-C302-11cf-9AA4-00AA004A5691}]@="LDAP Provider Object"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{228D9A81-C302-11cf-9AA4-00AA004A5691}\InprocServer32]@="adsldp.dll""ThreadingModel"="Both"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{228D9A81-C302-11cf-9AA4-00AA004A5691}\ProgID]@="LDAP"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{228D9A81-C302-11cf-9AA4-00AA004A5691}\TypeLib]@="{97d25db0-0363-11cf-abc4-02608c9e7553}"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{228D9A81-C302-11cf-9AA4-00AA004A5691}\Version]@="1.0"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{228D9A82-C302-11cf-9AA4-00AA004A5691}]@="LDAP Namespace Object"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{228D9A82-C302-11cf-9AA4-00AA004A5691}\InprocServer32]@="adsldp.dll""ThreadingModel"="Both"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{228D9A82-C302-11cf-9AA4-00AA004A5691}\ProgID]@="LDAPNamespace"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{228D9A82-C302-11cf-9AA4-00AA004A5691}\TypeLib]@="{97d25db0-0363-11cf-abc4-02608c9e7553}"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{228D9A82-C302-11cf-9AA4-00AA004A5691}\Version]@="1.0"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{274fae1f-3626-11d1-a3a4-00c04fb950dc}]@="ADs LDAP NameTranslate Object"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{274fae1f-3626-11d1-a3a4-00c04fb950dc}\InprocServer32]@="adsldp.dll""ThreadingModel"="Both"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{274fae1f-3626-11d1-a3a4-00c04fb950dc}\ProgID]@="NameTranslate"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{274fae1f-3626-11d1-a3a4-00c04fb950dc}\TypeLib]@="{97d25db0-0363-11cf-abc4-02608c9e7553}"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{274fae1f-3626-11d1-a3a4-00c04fb950dc}\Version]@="1.0"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{50B6327F-AFD1-11d2-9CB9-0000F87A369E}]@="AD System Info Object"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{50B6327F-AFD1-11d2-9CB9-0000F87A369E}\InprocServer32]@="adsldp.dll""ThreadingModel"="Both"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{50B6327F-AFD1-11d2-9CB9-0000F87A369E}\ProgID]@="ADSystemInfo"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{50B6327F-AFD1-11d2-9CB9-0000F87A369E}\TypeLib]@="{97d25db0-0363-11cf-abc4-02608c9e7553}"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{50B6327F-AFD1-11d2-9CB9-0000F87A369E}\Version]@="1.0"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP]@="LDAPNamespace""Aliases"="GC"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\Computer][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\Computer\{4de7016c-5ef9-11d1-8c13-00c04fd8d503}]"Interfaces"=hex(7):7b,00,33,00,65,00,33,00,37,00,65,00,33,00,32,00,30,00,2d,\00,31,00,37,00,65,00,32,00,2d,00,31,00,31,00,63,00,66,00,2d,00,61,00,62,00,\63,00,34,00,2d,00,30,00,32,00,36,00,30,00,38,00,63,00,39,00,65,00,37,00,35,\00,35,00,33,00,7d,00,00,00,00,00[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\Group][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\Group\{94a909a5-6f52-11d1-8c18-00c04fd8d503}]"Interfaces"=hex(7):7b,00,32,00,37,00,36,00,33,00,36,00,62,00,30,00,30,00,2d,\00,34,00,31,00,30,00,66,00,2d,00,31,00,31,00,63,00,66,00,2d,00,62,00,31,00,\66,00,66,00,2d,00,30,00,32,00,36,00,30,00,38,00,63,00,39,00,65,00,37,00,35,\00,35,00,33,00,7d,00,00,00,00,00[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\groupOfNames][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\groupOfNames\{94a909a5-6f52-11d1-8c18-00c04fd8d503}]"Interfaces"=hex(7):7b,00,32,00,37,00,36,00,33,00,36,00,62,00,30,00,30,00,2d,\00,34,00,31,00,30,00,66,00,2d,00,31,00,31,00,63,00,66,00,2d,00,62,00,31,00,\66,00,66,00,2d,00,30,00,32,00,36,00,30,00,38,00,63,00,39,00,65,00,37,00,35,\00,35,00,33,00,7d,00,00,00,00,00[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\groupOfUniqueNames][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\groupOfUniqueNames\{94a909a5-6f52-11d1-8c18-00c04fd8d503}]"Interfaces"=hex(7):7b,00,32,00,37,00,36,00,33,00,36,00,62,00,30,00,30,00,2d,\00,34,00,31,00,30,00,66,00,2d,00,31,00,31,00,63,00,66,00,2d,00,62,00,31,00,\66,00,66,00,2d,00,30,00,32,00,36,00,30,00,38,00,63,00,39,00,65,00,37,00,35,\00,35,00,33,00,7d,00,00,00,00,00[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\Locality][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\Locality\{2dfb3a35-6071-11d1-8c13-00c04fd8d503}]"Interfaces"=hex(7):7b,00,61,00,30,00,35,00,65,00,30,00,33,00,61,00,32,00,2d,\00,65,00,66,00,66,00,65,00,2d,00,31,00,31,00,63,00,66,00,2d,00,38,00,61,00,\62,00,63,00,2d,00,30,00,30,00,63,00,30,00,34,00,66,00,64,00,38,00,64,00,35,\00,30,00,33,00,7d,00,00,00,00,00[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\Organization][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\Organization\{dccc0bed-6066-11d1-8c13-00c04fd8d503}]"Interfaces"=hex(7):7b,00,61,00,31,00,63,00,64,00,32,00,64,00,63,00,36,00,2d,\00,65,00,66,00,66,00,65,00,2d,00,31,00,31,00,63,00,66,00,2d,00,38,00,61,00,\62,00,63,00,2d,00,30,00,30,00,63,00,30,00,34,00,66,00,64,00,38,00,64,00,35,\00,30,00,33,00,7d,00,00,00,00,00[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\Organizational Unit][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\Organizational Unit\{fd8d3a5f-6066-11d1-8c13-00c04fd8d503}]"Interfaces"=hex(7):7b,00,61,00,32,00,66,00,37,00,33,00,33,00,62,00,38,00,2d,\00,65,00,66,00,66,00,65,00,2d,00,31,00,31,00,63,00,66,00,2d,00,38,00,61,00,\62,00,63,00,2d,00,30,00,30,00,63,00,30,00,34,00,66,00,64,00,38,00,64,00,35,\00,30,00,33,00,7d,00,00,00,00,00[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\organizationalPerson][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\organizationalPerson\{4de7016c-5ef9-11d1-8c13-00c04fd8d503}]"Interfaces"=hex(7):7b,00,33,00,65,00,33,00,37,00,65,00,33,00,32,00,30,00,2d,\00,31,00,37,00,65,00,32,00,2d,00,31,00,31,00,63,00,66,00,2d,00,61,00,62,00,\63,00,34,00,2d,00,30,00,32,00,36,00,30,00,38,00,63,00,39,00,65,00,37,00,35,\00,35,00,33,00,7d,00,00,00,00,00[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\OrganizationalUnit][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\OrganizationalUnit\{fd8d3a5f-6066-11d1-8c13-00c04fd8d503}]"Interfaces"=hex(7):7b,00,61,00,32,00,66,00,37,00,33,00,33,00,62,00,38,00,2d,\00,65,00,66,00,66,00,65,00,2d,00,31,00,31,00,63,00,66,00,2d,00,38,00,61,00,\62,00,63,00,2d,00,30,00,30,00,63,00,30,00,34,00,66,00,64,00,38,00,64,00,35,\00,30,00,33,00,7d,00,00,00,00,00[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\person][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\person\{4de7016c-5ef9-11d1-8c13-00c04fd8d503}]"Interfaces"=hex(7):7b,00,33,00,65,00,33,00,37,00,65,00,33,00,32,00,30,00,2d,\00,31,00,37,00,65,00,32,00,2d,00,31,00,31,00,63,00,66,00,2d,00,61,00,62,00,\63,00,34,00,2d,00,30,00,32,00,36,00,30,00,38,00,63,00,39,00,65,00,37,00,35,\00,35,00,33,00,7d,00,00,00,00,00[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\PrintQueue][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\PrintQueue\{9f37f39c-6f49-11d1-8c18-00c04fd8d503}]"Interfaces"=hex(7):7b,00,62,00,31,00,35,00,31,00,36,00,30,00,64,00,30,00,2d,\00,31,00,32,00,32,00,36,00,2d,00,31,00,31,00,63,00,66,00,2d,00,61,00,39,00,\38,00,35,00,2d,00,30,00,30,00,61,00,61,00,30,00,30,00,36,00,62,00,63,00,31,\00,34,00,39,00,7d,00,00,00,7b,00,31,00,32,00,34,00,62,00,65,00,35,00,63,00,\30,00,2d,00,31,00,35,00,36,00,65,00,2d,00,31,00,31,00,63,00,66,00,2d,00,61,\00,39,00,38,00,36,00,2d,00,30,00,30,00,61,00,61,00,30,00,30,00,36,00,62,00,\63,00,31,00,34,00,39,00,7d,00,00,00,00,00[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\residentialPerson][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\residentialPerson\{4de7016c-5ef9-11d1-8c13-00c04fd8d503}]"Interfaces"=hex(7):7b,00,33,00,65,00,33,00,37,00,65,00,33,00,32,00,30,00,2d,\00,31,00,37,00,65,00,32,00,2d,00,31,00,31,00,63,00,66,00,2d,00,61,00,62,00,\63,00,34,00,2d,00,30,00,32,00,36,00,30,00,38,00,63,00,39,00,65,00,37,00,35,\00,35,00,33,00,7d,00,00,00,00,00[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\User][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\LDAP\Extensions\User\{4de7016c-5ef9-11d1-8c13-00c04fd8d503}]"Interfaces"=hex(7):7b,00,33,00,65,00,33,00,37,00,65,00,33,00,32,00,30,00,2d,\00,31,00,37,00,65,00,32,00,2d,00,31,00,31,00,63,00,66,00,2d,00,61,00,62,00,\63,00,34,00,2d,00,30,00,32,00,36,00,30,00,38,00,63,00,39,00,65,00,37,00,35,\00,35,00,33,00,7d,00,00,00,00,00[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\WinNT]@="WinNTNamespace"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\WinNT\Extensions][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Microsoft\ADs\Providers\WinNT\Extensions\User][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\LDAP]@="URL:LDAP Protocol""EditFlags"=hex:02,00,00,00"URL Protocol"=""[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\LDAP\Clsid]@="{228D9A81-C302-11cf-9AA4-00AA004A5691}"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\LDAP\shell][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\LDAP\shell\open][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\LDAP\shell\open\command]@=hex(2):22,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,\00,65,00,73,00,25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,\4d,00,61,00,69,00,6c,00,5c,00,77,00,61,00,62,00,2e,00,65,00,78,00,65,00,22,\00,20,00,22,00,2f,00,6c,00,64,00,61,00,70,00,3a,00,25,00,31,00,22,00,00,00,\00,00[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\LDAPNamespace][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\LDAPNamespace\Clsid]@="{228D9A82-C302-11cf-9AA4-00AA004A5691}"[HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\WinNT][HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\WinNT\Clsid] @="{8b20cd60-0f29-11cf-abc4-02608c9e7553}" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\WinNTNamespace] [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\WinNTNamespace\Clsid] @="{250e91a0-0367-11cf-abc4-02608c9e7553}" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{250e91a0-0367-11cf-abc4-02608c9e7553}] @="WinNT Namespace Object" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{250e91a0-0367-11cf-abc4-02608c9e7553}\InprocServer32] @="adsnt.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{250e91a0-0367-11cf-abc4-02608c9e7553}\ProgID] @="WinNTNamespace" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{250e91a0-0367-11cf-abc4-02608c9e7553}\TypeLib] @="{97d25db0-0363-11cf-abc4-02608c9e7553}" [HKEY_LOCAL_MACHINE\TMP_SOFTWARE\Classes\CLSID\{250e91a0-0367-11cf-abc4-02608c9e7553}\Version]
@="1.0"
[/codebox]
#5
Posted 03 June 2007 - 02:52 PM
Hi Xplod,Hallo,
here my 1st try, please test.
Xplod
thanks for the script. I think there is a typo in the script: mscoree.dll is written with 3 'l' and your script uses %PName% as part of the path for adsi.reg, but I think that variable is never initialized. I had no chance yet to test. I have no AD at home. And unless someone gets a Cisco VPN client running on VistaPE so I can connect to the company, I have to wait until Monday.
Many Greetings
MichaelZ
Update:
I just recalled that my computer in the company is running, so I connected to it with RDP over Cisco VPN, used WinBuilder over there and created the ADSI.script and ADSI.reg from the source boxes of the posting. I deleted the third 'l' and all '\%PName%', I've put the .reg in the same directory as the .script and also selected all components of the script Addons\common.script (to have ADODB available).
The build went fine, I booted the VistaPE, started the network and copied my vbscript that uses adsi/ldap from my computer. When I typed in the credentials for the net use command in order to copy it, I already knew that my test will fail. I realized that I'm not logged-in in VistaPE as an AD user. So all programs/scripts using SSPI will fail. And our AD does not accept anonymous binds.
Here is a code snippet of my vb script
Set objConnection = CreateObject("ADODB.Connection")Set objCommand = CreateObject("ADODB.Command")objConnection.Provider = "ADsDSOOBject"objConnection.Open "Active Directory Provider"Set objCommand.ActiveConnection = objConnectionSet objRootDSE = GetObject("LDAP://RootDSE")strDNSDomain = objRootDSE.Get("DefaultNamingContext")strFilter = "(&(objectCategory=person)(objectClass=user))"strQuery = "<LDAP://" & strDNSDomain & ">;" & strFilter & ";" &_ "sAMAccountName,userAccountControl" & ";subtree"objCommand.CommandText = strQueryobjCommand.Properties("Page Size") = 100objCommand.Properties("Timeout") = 30objCommand.Properties("Cache Results") = FalseSet objRecordSet = objCommand.Execute
The code fails on line
Set objRootDSE = GetObject("LDAP://RootDSE")
I guess because of the two reasons:
1) the VistaPE system is not a member of the AD and so how shall the system know which LDAP-Server to connect to
2) Authorisation problem
Does any one has an idea where and how to add both information?
Many Greetings
MichaelZ
#6
Posted 04 June 2007 - 12:37 PM
can you please post your Script and your reg.
Thanks
#7
Posted 04 June 2007 - 05:51 PM
can you please post your Script and your reg.
Hi Xplod,
the ADSI.script is the one from your post (#4 in this thread). I only made the two mentioned minor modifications. The ADSI.reg was exactly yours.
Or did you mean with script the complete vbscript?
Many Greetings
MichaelZ
#9
Posted 07 June 2007 - 09:29 AM
Hi XPlod, hi everyone else,I mean you vbscript.
here is one of my VBScripts that use ADO and ADSI.
I have not tried yet on VistaPE, but the name of the Active Directory can be specified as
strDNSDomain = "DC=mydomain,DC=de"
on my computer (but being a member of that AD anyhow).
But this wouldn't solve the authorization issue yet. Probably someone has an 'open' Active Directory where the ADSI part could be checked, or someone has the knowledge how to add the authorization
Many Greetings
MichaelZ
' Determine all deactivated accounts and echo them Option Explicit Dim objConnection, objCommand Dim objRootDSE, strDNSDomain, strFilter, strQuery, objRecordSet Dim strUsername, intUserAccountControl ' Use ADO to search the domain for all users. Set objConnection = CreateObject("ADODB.Connection") Set objCommand = CreateObject("ADODB.Command") objConnection.Provider = "ADsDSOOBject" objConnection.Open "Active Directory Provider" Set objCommand.ActiveConnection = objConnection ' Determine the DNS domain from the RootDSE object, set filter on user objects Set objRootDSE = GetObject("LDAP://RootDSE") strDNSDomain = objRootDSE.Get("DefaultNamingContext") strFilter = "(&(objectCategory=person)(objectClass=user))" strQuery = "<LDAP://" & strDNSDomain & ">;" & strFilter & ";" &_ "sAMAccountName,userAccountControl" & ";" &_ "subtree" objCommand.CommandText = strQuery objCommand.Properties("Page Size") = 100 objCommand.Properties("Timeout") = 30 objCommand.Properties("Cache Results") = False Set objRecordSet = objCommand.Execute Do Until objRecordSet.EOF intUserAccountControl = objRecordSet.Fields("userAccountControl") strUsername = objRecordSet.Fields("sAMAccountName") If ((intUserAccountControl And 512) <> 0) And ((intUserAccountControl And 2) <> 0) Then WScript.Echo "disabled account: " & strUsername End If objRecordSet.MoveNext Loop ' Clean up. objConnection.Close Set objConnection = Nothing Set objCommand = Nothing Set objRootDSE = Nothing Set objRecordSet = Nothing Wscript.Echo "Done"
#10
Posted 10 June 2007 - 08:10 PM
what about this:
To obtain the IADsOpenDSObject interface, perform a default bind to "LDAP:".
VB: set dso = Getobject("LDAP:")
set myObj = dso.OpenDSObject( adsPath, userName, password, ADS_SECURE_AUTHENTICATION)
or
Dim strPath 'path to authenticate to in the directory service
Dim strUsername 'DN of the username
Dim strPassword 'plain text password
Dim objNamespaceLDAP 'ADSI namespace object
Dim objMyObject 'root object of the directory
strPath = "LDAP://dc=amer,dc=mycorp,dc=com"
strUsername = "cn=Administrator,cn=Users,dc=amer,dc=mycorp,dc=com"
strPassword = "the password goes here in plain text"
Set objNamespaceLDAP = GetObject("LDAP:")
Set objMyObject = objNamespaceLDAP.OpenDSObject(strPath,strUsername,strPassword,0)
url:
http://techtasks.com...ng/Visual Basic
http://www.codeguru....ad.php?t=309184
xplod
p.s. if your script is working please post.
#11
Posted 17 June 2007 - 11:03 AM
Hi Xplod,Dim strPath 'path to authenticate to in the directory service
Dim strUsername 'DN of the username
Dim strPassword 'plain text password
Dim objNamespaceLDAP 'ADSI namespace object
Dim objMyObject 'root object of the directory
strPath = "LDAP://dc=amer,dc=mycorp,dc=com"
strUsername = "cn=Administrator,cn=Users,dc=amer,dc=mycorp,dc=com"
strPassword = "the password goes here in plain text"
Set objNamespaceLDAP = GetObject("LDAP:")
Set objMyObject = objNamespaceLDAP.OpenDSObject(strPath,strUsername,strPassword,0)
I modified my vbscript into
Set objLDAP = GetObject("LDAP:") strUser = "mydomain\myuserid" strPasswd = "mypasswd" Set objRootDSE = objLDAP.OpenDSObject("LDAP://DC=myactivedir,DC=de", strUser, strPasswd, 0)This code works fine on my desktop (Windows XP SP2, AD member) but it does not work on a Windows XP SP2 not being a member of that AD.
I also tried to specify the userid as LDAP path
strUser = "CN=myuserid,OU=Users,OU=.....,DC=myactivedir,DC=de"Again it works on my desktop, but not on a non domain member. So there can't be a chance to work on VistaPE.
This shows that the problem is not related to your ADSI script for VistaPE but it is an issue on how to use these objects on a non domain computer. Probably they require to run on domain member. Then there would be no chance to get them running on VistaPE.
Those are valuable sources. Probably I can find some information about non domain members.url:
http://techtasks.com...ng/Visual Basic
http://www.codeguru....d.php?t=3809184
Of course I will post the (hopefully positive?) result and intermediate steps.p.s. if your script is working please post.
It took so long to answer your post because I was enjoying one week of vacation
UPDATE:
I forgot to mention that I also tried both parameters ADS_SECURE_AUTHENTICATION, ADS_USE_ENCRYPTION (and both). The first one works with domain member, but still no luck with non domain member. The second one results in malfunctioning even with domain member, probably not supported in our AD.
#12
Posted 17 February 2009 - 04:36 AM
Thanks,
#13
Posted 17 February 2009 - 06:19 PM
xplod
#14
Posted 18 February 2009 - 01:24 AM
#15
Posted 21 March 2009 - 08:18 AM
Does anyone has an idea how to modify the given script to support ADSI on 64Bit PE?
Many thanks for any help!
Regards
Carsten
#16
Posted 10 September 2009 - 07:56 PM
Have you update your ADSI support script ?
Can i help you ?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users