- NSIS Discussion
- Dialup Internet & E-Mail
Archive: Dialup Internet & E-Mail
Vytautas
15th July 2003 13:37 UTC
Dialup Internet & E-Mail
Does anyone know of a way of creating & deleting dialup internet accounts using NSIS? It would also be nice to do the same to e-mail accounts in Outlook Express.
Also is there a way to check and disable "File & Printer Sharing" for dialup networking adapter?
Vytautas
n0On3
16th July 2003 11:58 UTC
Some time ago I found one program that could backup/restore dial-up accounts easily. you can found one utility that can do that and use it through nsis.
I don't use outlook, so I can't help on this.
Maybe there's a registry tweak to disable that sharing.
Vytautas
17th July 2003 14:32 UTC
I was thinking more along the lines of an API call or adding registry entries to add a dailup account and/or e-mail account.
Vytautas
kichik
17th July 2003 16:12 UTC
RasCreatePhonebookEntry is the closest function I could find. Dial-up uses RAS, so that's where your answer probably is. As for Outlook [Express], afaik it doesn't have any API. But you can probably create the right registry keys and folders. In Windows XP the folders are in Documents and Settings\USER\Local Settings\Application Data\Identities\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}. Look for {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} in the registry and you'll find the right registry key. As for File & Sharing, I have no idea... Maybe a VBScript would do the trick.
Vytautas
18th July 2003 06:00 UTC
I found that I can create an email account by creating several reg entries in this key "HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts\xxxxxxxx". I have two questions about this:
1) Is there a way of getting the next available subfolder in the registry, i.e. it uses hex numbers.
2) The 'pop3 password2' value seemed to be somehow encrypted, is there a API call to encrypt a password so that it can be written to the registry?
Vytautas
kichik
18th July 2003 11:22 UTC
That hex number is a GUID, you have to generate a new one using CoCreateGuid. It'll probably be easier to use uuidgen.exe (a utility by Microsoft) to convert it to a string you can use in the registry.
As for the password, no idea. It's probably using CryptoAPI and might even use the CryptEncryptMessage function, but I am not sure.
Vytautas
18th July 2003 12:36 UTC
kichik are you sure that it is GUID, it seems very short for it as its only 8 chars long and seems to be sequential. Note that it is in the "HKEY_CURRENT_USER" and not in "HKEY_LOCAL_MACHINE".
As for the password thanks for the hint, I'll try to compare the results from those API functions with the results generated from within outlook express.
Vytautas
BTW where could i find more info about RAS.
kichik
18th July 2003 12:43 UTC
Are you sure you're looking at the right place? My Outlook Express account information is in HKEY_CURRENT_USER\Identities\{guid}\Software\Microsoft\Outlook Express.
You can find more information about RAS in MSDN.
Vytautas
18th July 2003 12:50 UTC
Which version of windows are you running? I tried Win2k and WinXP and found that "HKEY_CURRENT_USER\Identities\{guid}\Software\Microsoft\Outlook Express" location contains setting for Outlook Express and that "HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts\xxxxxxxx" contains the actual e-mail account settings such as pop3 & smtp servers, username, etc.
Vytautas
kichik
18th July 2003 13:52 UTC
I'm using XP and the account information is in a key called "Internet Account Manager", just as yours, but under the same key as the above Outlook Express key.
I have multiple users on this computer, and had multiple OE users (identities) on this user, so that's must be why it's not in the same place.
Vytautas
18th July 2003 22:28 UTC
Yes the multiple OE identities would explain that, so under the second key do you have just the GUID or are there other keys after that, i.e. "00000001".
Also is there a way to enumerate keys in a specified branch of the registry and/or check if a specified key exists.
Vytautas
kichik
18th July 2003 22:32 UTC
Under Internet Account Manager it's exactly as you've described.
To enumerate a key use EnumRegKey and EnumRegValue.
pengyou
19th July 2003 11:48 UTC
OE stores account data in two different places, depending upon the identity involved. There is an original "Main Identity" which is usually created when OE is installed. If other identities are created, their account data is stored separately from that of the original "Main Identity".
I found a helpful description here: http://insideoe.tomsterdam.com/files/regkeys.htm