Link to home
Start Free TrialLog in
Avatar of bsharath
bsharathFlag for India

asked on

Connect to microsoft exchange via HTTP.

Hi,

Connect to microsoft exchange via HTTP.
I want a script that can set this in Outlook 2003 & 2007.
A Vbs when run sets the specific settings as screenshot.

Regards
Sharath

Capture.JPG
Avatar of Shreedhar Ette
Shreedhar Ette
Flag of India image

Hi,

Refer this article:
http://cyrusbuilt.net/wordpress/?p=150

Hope this helps,
Shree
basically, the registry entries which reflect microsoft exchange are located here:
HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\
so u can use any scripting language (vbs, powershell, batch) to modify this entries according to @shreedhar posted link.

if u need i can create the script for you in your preferred scripting language.
Avatar of bsharath

ASKER

Hi sedgwick
Can you help with a vbs that can insert the data into the outlook profile
no problem, can u post a screenshot of the entries in the registry under
CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook ?
Below is the detail
Capture.JPG
please post screenshot of the following registry key:
13dbb0c8aa05101a9bb000aa002fc45a

it's the 3rd one in the list of keys
Attached the same...
Capture.JPG
since i have only part of the mapping of registry keys to the actual settings in the first screenshot u posted i need u to help me map the rest of them.

settings i already mapped:

001f6622  - relate to the address in the "https://" textbox
001f6625  - relate to the address in the 2nd textbox, labeled as "Only connect to proxy servers that have this principal name in their certificate"

u can see other settings u wish to set, other than those 2 above?
Sorry not sure how you are converting the symbols to the requirment
If i can get the address the 2 checkboxes and the other 2 removed if available and the NTLM as per the screenshot its fine..
no problem, be back to you
i've done it in powershell cause it much easier and shorter script:
$a = "oa.inlth.com";
    $b = $a.ToCharArray();
	$c = ""
    Foreach ($element in $b) {$c = $c + " " + [System.String]::Format("{0:X}", [System.Convert]::ToUInt32($element))}
   	
	Set-ItemProperty -path "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\13dbb0c8aa05101a9bb000aa002fc45a" -name "001f6622" -value $c
	
	$a = "msstd:a.inlth.com";
    $b = $a.ToCharArray();
	$c = ""
    Foreach ($element in $b) {$c = $c + " " + [System.String]::Format("{0:X}", [System.Convert]::ToUInt32($element))}
   	
	Set-ItemProperty -path "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\13dbb0c8aa05101a9bb000aa002fc45a" -name "001f6625" -value $c
	
	$c = ([byte[]](0x02,0x00,0x00,0x00))
	Set-ItemProperty -path "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\13dbb0c8aa05101a9bb000aa002fc45a" -name "00036627" -value $c

Open in new window

sedgwick
I need to us this on regular basis and will need users to run it. Powershell would be tough
Can ihave a batch or vbs way
Any views with this
@Dhaest

is it possible to reopen this thread so i can provide vb script (as bsharath requested)?
should i object in order to stop the closing process?
here's the code in vb script.
const HKCU = &H80000001 
dim expression, strKeyPath

strKeyPath = "Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\13dbb0c8aa05101a9bb000aa002fc45a"
Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")

expression = "oa.inlth.com"
BinaryValueName = "001f6622"
oReg.SetBinaryValue HKCU,strKeyPath,BinaryValueName,Str2BinU(expression)

expression = "msstd:a.inlth.com"
BinaryValueName = "001f6625"
oReg.SetBinaryValue HKCU,strKeyPath,BinaryValueName,Str2BinU(expression)

iValues = Array(&H02,&H00,&H00,&H00)
BinaryValueName = "00036627"
oReg.SetBinaryValue HKCU,strKeyPath,BinaryValueName,iValues
	
Function Str2BinU(Src)	  
	Dim Tmp(), I, L  
	L = LenB(Src): ReDim Tmp(L - 1)  
	For I = 1 To L: Tmp(I - 1) = AscB(MidB(Src, I)): Next  
	Str2BinU = Tmp  	  
End Function

Open in new window

Hi sedgwick
No error and no change in Outlook
I use outlook 2007
can u check if the registry keys were updated?
Inside this path
Subsystem\Profiles\Outlook
there is no outlook folder in the registry
I have with my name
Will need to check in all folders in the registry within profiles. Can be any name inside profiles folder
can u post the full registry path of the values you posted earlier?
the registry screenshot you posted, what is the path of all those keys?
@Dhaest

I'll help bsharath till a satisfied solution will be provided.
attached the screenshot
Outlook.JPG
so take this path and replace it in the vb script.

so instead of:

Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\13dbb0c8aa05101a9bb000aa002fc45a

use this:

Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Sharath-????\13dbb0c8aa05101a9bb000aa002fc45a

replace the Sharath-???? with the key entry (you marked it with blue).

before running the script, make sure to backup the whole registry key (Export it as .ref file).
run the script and compare it to the exported .reg file, to see that changes were applied.
But i will need it for any machine and with any name.
Can we have it like check till profiles and any profile below it with any name do this change?
sure, i'll update the script
ASKER CERTIFIED SOLUTION
Avatar of Meir Rivkin
Meir Rivkin
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks a lot sedgwick
works perfect.. :-)