#114352 - 2004-02-19 02:45 PM
Re: Changing registry key for smtp server. ??
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
That's easy then:
$sKeyName="HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts\00000001" $sValueName="SMTP Server" $sOldServer="xxx.yyyyyyyyyy.zzz" $sNewServer="aaa.bbbbbbbbbb.ccc" If ReadValue($sKeyName,$sValueName)=$sOldServer $sIgnore=WriteValue($sKeyName,$sValueName,$sNewServer,"REG_SZ") EndIf
|
This will obviously only work if the sub-key always ends "0000001".
You may need to use EnumKey() to check each of the keys if it does not remain the same. If you get stuck, post again.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 787 anonymous users online.
|
|
|