'Modify POP3 account properties in registry
I want to modify a registry valur using a batch file. I know how to do it using a .reg file but I need to do it using a batch file as there are some more commands in the batch file.
So, I want to change the following value:
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\15.0\Outlook\Profiles\Outlook\9375CFF0413111d3B88A00104B2A6676\00000004]
"POP3 Server"=hex:31,00,39,00,32,00,2e,00,30,00,2e,00,30,00,2e,00,31,00,30,00,\
30,00,00,00
Any idea?
Solution 1:[1]
Are you trying to modify the POP3 server name? You should not do that directly in the registry -
- "15" above is for Outlook 2013, so no other version of Outlook will work
- "Outlook" above represents the profile name. What if the user has a different profile name?
- "9375CFF0413111d3B88A00104B2A6676" is the profile section GUID. It is different on each machine.
- 4 is the account id. Also different on different machines.
You need to use either IOlkAccountManager API (C++ or Delphi only - you can see the data in OutlookSpy (I am its author) if you click the IOlkAccountManager button) or Redemption (I am also its author - any language) - its RDOPOPAccount object explicitly exposes the POP3 server name:
set Session = CreateObject("Redemption.RDOSession")
Session.Logon("YourProfileName")
set Accounts = Session.Accounts
for each Account in Accounts
if Account.AccountType = 0 Then 'atPOP3
'MsgBox "POP3 server for account " & Account.Name & ": " & Account.POP3_Server
if Account.POP3_Server = "server1.com" Then
Account.POP3_Server = "server2.com"
Account.Save
End If
end if
next
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
