Jump to content











Photo
- - - - -

LDAP in Win PE 2.0


  • Please log in to reply
15 replies to this topic

#1 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 17 March 2007 - 10:39 PM

This question was placed by tofuBug from msfn.org:
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.

:cheers:

#2 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 18 March 2007 - 01:06 AM

WinPE 2.0 is a Vista based Pe, isn't it?

#3 NightMan

NightMan

    Frequent Member

  • .script developer
  • 433 posts
  • Location:Russian, Moscow

Posted 20 March 2007 - 08:22 AM

WinPE 2.0 is a Vista based Pe, isn't it?


Yes

#4 xplod

xplod

    Frequent Member

  • Advanced user
  • 158 posts
  •  
    Germany

Posted 03 June 2007 - 07:45 AM

Hallo,

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 MichaelZ

MichaelZ

    Frequent Member

  • Team Reboot
  • 333 posts
  • Location:Braunschweig, Germany
  •  
    Germany

Posted 03 June 2007 - 02:52 PM

Hallo,

here my 1st try, please test.

Xplod

Hi 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 :confused1: 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 xplod

xplod

    Frequent Member

  • Advanced user
  • 158 posts
  •  
    Germany

Posted 04 June 2007 - 12:37 PM

Hallo michaelZ,

can you please post your Script and your reg.

Thanks

#7 MichaelZ

MichaelZ

    Frequent Member

  • Team Reboot
  • 333 posts
  • Location:Braunschweig, Germany
  •  
    Germany

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

#8 xplod

xplod

    Frequent Member

  • Advanced user
  • 158 posts
  •  
    Germany

Posted 07 June 2007 - 05:44 AM

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



Hallo,

I mean you vbscript.

thanks

Xplod

#9 MichaelZ

MichaelZ

    Frequent Member

  • Team Reboot
  • 333 posts
  • Location:Braunschweig, Germany
  •  
    Germany

Posted 07 June 2007 - 09:29 AM

I mean you vbscript.

Hi XPlod, hi everyone else,

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 :1st:

Many Greetings
MichaelZ

&#39; Determine all deactivated accounts and echo them

Option Explicit



Dim objConnection, objCommand

Dim objRootDSE, strDNSDomain, strFilter, strQuery, objRecordSet

Dim strUsername, intUserAccountControl



&#39; Use ADO to search the domain for all users.

Set objConnection = CreateObject&#40;&#34;ADODB.Connection&#34;&#41;

Set objCommand = CreateObject&#40;&#34;ADODB.Command&#34;&#41;

objConnection.Provider = &#34;ADsDSOOBject&#34;

objConnection.Open &#34;Active Directory Provider&#34;

Set objCommand.ActiveConnection = objConnection



&#39; Determine the DNS domain from the RootDSE object, set filter on user objects

Set objRootDSE = GetObject&#40;&#34;LDAP&#58;//RootDSE&#34;&#41;

strDNSDomain = objRootDSE.Get&#40;&#34;DefaultNamingContext&#34;&#41;

strFilter = &#34;&#40;&&#40;objectCategory=person&#41;&#40;objectClass=user&#41;&#41;&#34;

strQuery = &#34;<LDAP&#58;//&#34; & strDNSDomain & &#34;>;&#34; & strFilter & &#34;;&#34; &_

		   &#34;sAMAccountName,userAccountControl&#34; & &#34;;&#34; &_

		   &#34;subtree&#34;

objCommand.CommandText = strQuery

objCommand.Properties&#40;&#34;Page Size&#34;&#41; = 100

objCommand.Properties&#40;&#34;Timeout&#34;&#41; = 30

objCommand.Properties&#40;&#34;Cache Results&#34;&#41; = False



Set objRecordSet = objCommand.Execute

Do Until objRecordSet.EOF

  intUserAccountControl = objRecordSet.Fields&#40;&#34;userAccountControl&#34;&#41;

  strUsername = objRecordSet.Fields&#40;&#34;sAMAccountName&#34;&#41;

  If &#40;&#40;intUserAccountControl And 512&#41; <> 0&#41; And &#40;&#40;intUserAccountControl And 2&#41; <> 0&#41; Then

	WScript.Echo &#34;disabled account&#58; &#34; & strUsername

  End If

  objRecordSet.MoveNext

Loop



&#39; Clean up.

objConnection.Close

Set objConnection = Nothing

Set objCommand = Nothing

Set objRootDSE = Nothing

Set objRecordSet = Nothing



Wscript.Echo &#34;Done&#34;


#10 xplod

xplod

    Frequent Member

  • Advanced user
  • 158 posts
  •  
    Germany

Posted 10 June 2007 - 08:10 PM

Hallo,

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 MichaelZ

MichaelZ

    Frequent Member

  • Team Reboot
  • 333 posts
  • Location:Braunschweig, Germany
  •  
    Germany

Posted 17 June 2007 - 11:03 AM

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)

Hi Xplod,

I modified my vbscript into
Set objLDAP = GetObject&#40;&#34;LDAP&#58;&#34;&#41;

strUser =  &#34;mydomain\myuserid&#34;

strPasswd = &#34;mypasswd&#34;

Set objRootDSE = objLDAP.OpenDSObject&#40;&#34;LDAP&#58;//DC=myactivedir,DC=de&#34;, strUser, strPasswd, 0&#41;
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 =  &#34;CN=myuserid,OU=Users,OU=.....,DC=myactivedir,DC=de&#34;
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.

url:
http://techtasks.com...ng/Visual Basic
http://www.codeguru....d.php?t=3809184

Those are valuable sources. Probably I can find some information about non domain members.

p.s. if your script is working please post.

Of course I will post the (hopefully positive?) result and intermediate steps.
It took so long to answer your post because I was enjoying one week of vacation :1st:


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 gelepawa

gelepawa
  • Members
  • 2 posts

Posted 17 February 2009 - 04:36 AM

Hi All, I know this is an old thread but does anyone know if its possible to add ADSI support to WINPE x64? It's working well with x86 version but I haven't been able to get it to work with x64.

Thanks,

#13 xplod

xplod

    Frequent Member

  • Advanced user
  • 158 posts
  •  
    Germany

Posted 17 February 2009 - 06:19 PM

Sorry no!

xplod

#14 gelepawa

gelepawa
  • Members
  • 2 posts

Posted 18 February 2009 - 01:24 AM

Because I got a little impatient I went investigating further. Thanks for the response xplod but I managed to get it working with PE x64.

#15 csc

csc
  • Members
  • 3 posts

Posted 21 March 2009 - 08:18 AM

Hi there!

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 ludovici

ludovici

    Silver Member

  • .script developer
  • 610 posts
  • Location:France
  •  
    France

Posted 10 September 2009 - 07:56 PM

Hello xplod ;)
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