Archive: Dialup Internet & E-Mail


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


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.


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


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.


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


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.


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.


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.


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


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.


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


Under Internet Account Manager it's exactly as you've described.

To enumerate a key use EnumRegKey and EnumRegValue.


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