#74357 - 2003-04-09 09:06 AM
Read receipts setting for OE and Outlook
|
onlinrgames
Fresh Scripter
Registered: 2002-07-23
Posts: 27
|
Hi,
We would like to set the "Read receipts" setting in Microsoft Outlook and Outlook Express to a default "Notify me for each read receipt request".
I have written a script which works fine if there is only one identity configured in OE or Outlook. But, if there is more than one, the script does not set for all identities.
Would greatly appreciate if somebody could shed some light on how to achieve it for all users. My code is given below for your reference. code:
Break On $var_name = ReadValue("HKEY_CURRENT_USER\Identities","Default User ID") $reg_value_OE = ReadValue ("HKEY_CURRENT_USER\Identities\$var_name\Software\Microsoft\Outlook Express\5.0","SendMDN") $Outlook_exist = KeyExist ("HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Options\Mail") $reg_value_MO = 3 ; Dummy value for Microsoft Outlook registry value If $Outlook_exist = 1 $reg_value_MO = ReadValue ("HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Options\Mail","Receipt Response") EndIf
Select Case ($reg_value_OE = 1) OR ($reg_value_MO = 0) $Mail_App_Setting = 1 Case ($reg_value_OE = 2) OR ($reg_value_MO = 1) $Mail_App_Setting = 2 Case ($reg_value_OE = 4) OR ($reg_value_MO = 2) $Mail_App_Setting = 3 EndSelect
If ($Mail_App_Setting = 1) OR ($Mail_App_Setting = 2) $mod_reg_OE = WriteValue ("HKEY_CURRENT_USER\Identities\$var_name\Software\Microsoft\Outlook Express\5.0","SendMDN","4","REG_DWORD") If $Outlook_exist = 1 $mod_reg_MO = WriteValue ("HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Options\Mail","Receipt Response","2","REG_DWORD") EndIf EndIf Exit
Regards
Onlinegames
|
|
Top
|
|
|
|
#74358 - 2003-04-09 09:24 AM
Re: Read receipts setting for OE and Outlook
|
Lonkero
KiX Master Guru
   
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
mm... easiest might be to enumerate all identities...
so, your script would look something like:
$index=0 $var_name = enumkey("HKEY_CURRENT_USER\Identities",$index) while @error=0 and len($var_name) $reg_value_OE = ReadValue ("HKEY_CURRENT_USER\Identities\$var_name\Software\Microsoft\Outlook Express\5.0","SendMDN") $Outlook_exist = KeyExist ("HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Options\Mail") $reg_value_MO = 3 ; Dummy value for Microsoft Outlook registry value If $Outlook_exist = 1 $reg_value_MO = ReadValue ("HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Options\Mail","Receipt Response") EndIf
Select Case ($reg_value_OE = 1) OR ($reg_value_MO = 0) $Mail_App_Setting = 1 Case ($reg_value_OE = 2) OR ($reg_value_MO = 1) $Mail_App_Setting = 2 Case ($reg_value_OE = 4) OR ($reg_value_MO = 2) $Mail_App_Setting = 3 EndSelect
If ($Mail_App_Setting = 1) OR ($Mail_App_Setting = 2) $mod_reg_OE = WriteValue ("HKEY_CURRENT_USER\Identities\$var_name\Software\Microsoft\Outlook Express\5.0","SendMDN","4","REG_DWORD") If $Outlook_exist = 1 $mod_reg_MO = WriteValue ("HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Options\Mail","Receipt Response","2","REG_DWORD") EndIf EndIf $index=$index+1 $var_name = enumkey("HKEY_CURRENT_USER\Identities",$index) loop
_________________________
!download KiXnet
|
|
Top
|
|
|
|
#74359 - 2003-04-09 10:42 AM
Re: Read receipts setting for OE and Outlook
|
onlinrgames
Fresh Scripter
Registered: 2002-07-23
Posts: 27
|
Hi Lonkero,
Thanks a lot for the suggestion. Worked like a charm ..
But, I guess, I should have checked the manual to see if there is any command which would have helped me..
Regards
Onlinegames
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|