#25955 - 2002-07-26 06:06 PM
MS Outlook Registry Change
|
ITDEPT
Fresh Scripter
Registered: 2002-06-11
Posts: 26
Loc: Edmonton, Alberta, Canada
|
Okay. Here goes.
In my logon scrip for NT machines, I want to change an Outlook setting for a certain group of users in our company. Since I am lazy, I want to use the script to change their reply-to address in their outlook account by changing the resigstry string that is responsible.
So far this is the portion I am working on. My question is; How do I concatenate the user name with the "@companyname.com" section of their e-mail address in the registry??
Is this right?, or am I out to lunch? __________________________________________
IF INGROUP ("Accounting") SELECT CASE ($NT_mode = "yes") WriteValue ("HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Outlook\OMI Account Manager\Accounts\00000001", "SMTP Reply To Email Address", "@userid@companyname.com", "REG_BINARY")
|
|
Top
|
|
|
|
#25957 - 2002-07-26 06:44 PM
Re: MS Outlook Registry Change
|
ITDEPT
Fresh Scripter
Registered: 2002-06-11
Posts: 26
Loc: Edmonton, Alberta, Canada
|
I know the REG_BINARY part is wrong because it is a string that I have to modify.
|
|
Top
|
|
|
|
#25959 - 2002-07-26 06:46 PM
Re: MS Outlook Registry Change
|
ITDEPT
Fresh Scripter
Registered: 2002-06-11
Posts: 26
Loc: Edmonton, Alberta, Canada
|
On that note...REG_STRING???
I know that doesn't exist, but what is the REG_* command for a string edit?
|
|
Top
|
|
|
|
#25961 - 2002-07-26 06:48 PM
Re: MS Outlook Registry Change
|
ITDEPT
Fresh Scripter
Registered: 2002-06-11
Posts: 26
Loc: Edmonton, Alberta, Canada
|
It is a string...REG_SZ??
|
|
Top
|
|
|
|
#25963 - 2002-07-26 07:03 PM
Re: MS Outlook Registry Change
|
ITDEPT
Fresh Scripter
Registered: 2002-06-11
Posts: 26
Loc: Edmonton, Alberta, Canada
|
Okay folks...how does it look? ------------------------------------- IF INGROUP ("accounting") SELECT CASE ($NT_mode = "yes") WriteValue ("HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Outlook\OMI Account Manager\Accounts\00000001", "SMTP Reply To Email Address", @userid+"@companyname.com", "REG_SZ")
END SELECT END IF
|
|
Top
|
|
|
|
#25964 - 2002-07-26 07:05 PM
Re: MS Outlook Registry Change
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
here is a routine that will take a string and convert it into a reg_binary format
code:
$label="string to convert" for $loop = 1 to len($label) ; ******* parse the label and convert to hex string $hexchar=dectohex(asc(substr("$label",$loop,1))) $hexlabel=$hexlabel+$hexchar+"00" next while len($hexlabel) < 128 ; ******* Buffer the hex string to 128 characters $hexlabel=$hexlabel+"00" loop
|
|
Top
|
|
|
|
#25965 - 2002-07-26 07:07 PM
Re: MS Outlook Registry Change
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
endselect and endif are supposed to be 1 word (each)
btw.. if you do not want a lot of zeros (0) showing up in your console window, put a variable in front of your writevalue statement
$rc=writevalue... [ 26 July 2002, 19:09: Message edited by: Radimus ]
|
|
Top
|
|
|
|
#25968 - 2002-07-26 10:57 PM
Re: MS Outlook Registry Change
|
ITDEPT
Fresh Scripter
Registered: 2002-06-11
Posts: 26
Loc: Edmonton, Alberta, Canada
|
Something is wrong, all the script does is beep at me. I HATE THAT!!!
I suspect it is the registry key-type. It is a string, not binary or dword. Right now I'm using REG_SZ and all it will do is beep, it doesn't change a darn thing in the registry...
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1160 anonymous users online.
|
|
|