WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Modems and Dial-up Networking

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Get Username for a DUN Connectoid

Keywords: 	 Get Username for a DUN Connectoid

Haven't seen any code on this, so I thought I'd post it in case someone else needed to know how to get the username for a DUN connectoid. If you already know the connection name (use RasItemize if you don't) you can use this to get the username:
;See if username is in registry
;defaultDUN is the connectoid name
strUsername = RegQueryStr(@REGCURRENT, "RemoteAccess\Profile\%defaultDUN%[User]")
This works in Win98se, can't confirm in other versions.
Article ID:   W15549
File Created: 2003:05:13:11:28:40
Last Updated: 2003:05:13:11:28:40