Адресная книга из ActiveDirectory
В outlook адресную книгу можно подключить используя AD. Главное что бы у пользователя была прописана почта. В настройках учетной записи для outlook подключаем удаленную книгу и радуемся контактам.
Нашел скрипт для решения данной задачи в домене:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
On Error Resume Next const HKEY_CURRENT_USER = &H80000001 strComputer = "." Set oReg=GetObject( "winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") RegistryFolder = "Software\Microsoft\Office\15.0\Outlook\Profiles\Outlook\" LDAPdisplayname = "AddressBook" 'Название адресной книги LDAPserver = "192.168.*.*" 'Адрес сервера AD LDAPport = "389" 'Порт LDAPsearchbase = "ou=Пользователи,dc=domain,dc=local" 'Расположение контейнера с пользователи sKeyPath = RegistryFolder & "0a0d020000000000c000000000000046\" oReg.CreateKey HKEY_CURRENT_USER, sKeyPath oReg.SetBinaryValue HKEY_CURRENT_USER, sKeyPath, "000b3d1c", Array(&H00,&H00) oReg.SetBinaryValue HKEY_CURRENT_USER, sKeyPath, "00033d1b", Array(&H01,0,0,0) sKeyPath = RegistryFolder & "e8cb48869c395445ade13e3c1c80d154\" If oReg.EnumKey(HKEY_CURRENT_USER, sKeyPath, "", "") = 0 Then Wscript.Quit Else oReg.CreateKey HKEY_CURRENT_USER, sKeyPath oReg.SetBinaryValue HKEY_CURRENT_USER, sKeyPath, "00033009", Array(0,0,0,0) oReg.SetBinaryValue HKEY_CURRENT_USER, sKeyPath, "00033e03", Array(&H23,0,0,0) oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e3001", "Microsoft LDAP Directory" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e3006", "Microsoft LDAP Directory" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e300a", "EMABLT.DLL" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e3d09", "EMABLT" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e3d13", "{6485D268-C2AC-11D1-AD3E-10A0C911C9C0}" oReg.SetBinaryValue HKEY_CURRENT_USER, sKeyPath, "01023d0c", Array(&H5c,&Hb9,&H3b,&H24,&Hff,&H71,&H07,&H41,&Hb7,&Hd8,&H3b,&H9c,&Hb6,&H31,&H79,&H92) sKeyPath = RegistryFolder & "5cb93b24ff710741b7d83b9cb6317992\" oReg.CreateKey HKEY_CURRENT_USER, sKeyPath oReg.SetBinaryValue HKEY_CURRENT_USER, sKeyPath, "00033009", Array(&H20,0,0,0) oReg.SetBinaryValue HKEY_CURRENT_USER, sKeyPath, "000b6613", Array(0,0) oReg.SetBinaryValue HKEY_CURRENT_USER, sKeyPath, "000b6615", Array(&H01,&H00) oReg.SetBinaryValue HKEY_CURRENT_USER, sKeyPath, "000b6622", Array(&H01,&H00) oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e3001", LDAPdisplayname oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e3d09", "EMABLT" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e3d0a", "BJABLR.DLL" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e3d0b", "ServiceEntry" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e3d13", "{6485D268-C2AC-11D1-AD3E-10A0C911C9C0}" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e6600", LDAPserver oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e6601", LDAPport oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e6602", "" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e6603", LDAPsearchbase oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e6604", "(&(mail=*)(|(mail=%s*)(|(cn=%s*)(|(sn=%s*)(givenName=%s*)))))" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e6605", "SMTP" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e6606", "mail" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e6607", "60" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e6608", "100" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e6609", "120" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e660a", "15" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e660b", "" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e660c", "OFF" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e660d", "OFF" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e660e", "NONE" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e660f", "OFF" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e6610", "postalAddress" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e6611", "cn" oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath , "001e6612", "1" oReg.SetBinaryValue HKEY_CURRENT_USER, sKeyPath, "001e67f1", Array(&H0a) oReg.SetBinaryValue HKEY_CURRENT_USER, sKeyPath, "01023615", Array(&H50,&Ha7,&H0a,&H61,&H55,&Hde,&Hd3,&H11,&H9d,&H60,&H00,&Hc0,&H4f,&H4c,&H8e,&Hfa) oReg.SetBinaryValue HKEY_CURRENT_USER, sKeyPath, "01023d01", Array(&He8,&Hcb,&H48,&H86,&H9c,&H39,&H54,&H45,&Had,&He1,&H3e,&H3c,&H1c,&H80,&Hd1,&H54) oReg.SetBinaryValue HKEY_CURRENT_USER, sKeyPath, "01026631", Array(&H98,&H17,&H82,&H92,&H5b,&H43,&H03,&H4b,&H99,&H5d,&H5c,&Hc6,&H74,&H88,&H7b,&H34) oReg.SetBinaryValue HKEY_CURRENT_USER, sKeyPath, "101e3d0f", Array(&H02,&H00,&H00,&H00,&H0c,&H00,&H00,&H00,&H17,&H00,&H00,&H00,&H45,&H4d,&H41,&H42,&H4c,&H54,&H2e,&H44,&H4c,&H4c,&H00,&H42,&H4a,&H41,&H42,&H4c,&H52,&H2e,&H44,&Hc,&H4c,&H00) sKeyPath = RegistryFolder & "9207f3e0a3b11019908b08002b2a56c2\" oReg.getBinaryValue HKEY_CURRENT_USER,sKeyPath, "01023d01",Backup Dim oldLength oldLength = UBound (Backup) ReDim Preserve Backup(oldLength+16) Backup(oldLength+1) = &He8 Backup(oldLength+2) = &Hcb Backup(oldLength+3) = &H48 Backup(oldLength+4) = &H86 Backup(oldLength+5) = &H9c Backup(oldLength+6) = &H39 Backup(oldLength+7) = &H54 Backup(oldLength+8) = &H45 Backup(oldLength+9) = &Had Backup(oldLength+10) = &He1 Backup(oldLength+11) = &H3e Backup(oldLength+12) = &H3c Backup(oldLength+13) = &H1c Backup(oldLength+14) = &H80 Backup(oldLength+15) = &Hd1 Backup(oldLength+16) = &H54 oReg.SetBinaryValue HKEY_CURRENT_USER, sKeyPath, "01023d01", Backup sKeyPath = RegistryFolder & "9207f3e0a3b11019908b08002b2a56c2\" oReg.getBinaryValue HKEY_CURRENT_USER,sKeyPath, "01023d0e",Backup oldLength = UBound (Backup) ReDim Preserve Backup(oldLength+16) Backup(oldLength+1) = &H5c Backup(oldLength+2) = &Hb9 Backup(oldLength+3) = &H3b Backup(oldLength+4) = &H24 Backup(oldLength+5) = &Hff Backup(oldLength+6) = &H71 Backup(oldLength+7) = &H07 Backup(oldLength+8) = &H41 Backup(oldLength+9) = &Hb7 Backup(oldLength+10) = &Hd8 Backup(oldLength+11) = &H3b Backup(oldLength+12) = &H9c Backup(oldLength+13) = &Hb6 Backup(oldLength+14) = &H31 Backup(oldLength+15) = &H79 Backup(oldLength+16) = &H92 oReg.SetBinaryValue HKEY_CURRENT_USER, sKeyPath, "01023d0e", Backup sKeyPath = RegistryFolder & "9375CFF0413111d3B88A00104B2A6676\{ED475419-B0D6-11D2-8C3B-00104B2A6676}" oReg.DeleteKey HKEY_CURRENT_USER, sKeyPath End If |
С office 2013 работает исправно, но бывает, что не подключается!
Один комментарий
Константин
Этот скрипт старый и не работает уже давно!