Read Input & Insert to Registry
Hi all,
I'm really trying to wrap my head around NSIS, but I am having a difficult time with it.
I have one thing I need the installer to do:
a) Check the registry to see if an(y) email account already exists. Email accounts are added sequentially by Outlook Express under the key:
"Software\Microsoft\Internet Account Manager\Accounts\00000001" (or 000000002 etc)
b) If 00000001 already exists, change the key "SMTP Server" to "smtp.domainname.com" and move on to 000000002 to see if that already exists. If it does not exist, write a couple registry keys for email settings.
c) If no email accounts exist, create the 00000001 entry and add subkeys, like:
POP3 Server
REG_SZ
mail.domain.com
POP3 User Name
REG_SZ
userinput@domain.com
POP3 Prompt for Password
REG_DWORD
0x0
SMTP Server
REG_SZ
mail.domain.com
SMTP Display Name
REG_SZ
User Input Name
SMTP Email Address
REG_SZ
userinput@domain.com
I used InstallOptions to create a page that has fields for them to type this information in. I am not sure how to "grab" this information and push it to the registry. If for example the fields are
Field 5: RealName
Field 6: email address
I have stuff like this in the function:
GetDlgItem $1 $hwnd 1204 ; Get RealName Input box (1200 + field 5 - 1)
But I'm not sure how to move stuff over to the registry. I'm reading as much as I can as fast as I can, but it's driving me nuts. :(