MOTOBIT.COM - ASP upload, IIS utility AddConnection Method of Server class

Method | Member of  RegEdit.Server | Changes | Purchase | Download


Makes a connection to a network resource (remote computer).


Server.AddConnection (RemoteName as String, [UserName as String = Empty string], [Password as String = Empty string])

Where Type Optional Default Description
 RemoteName  String     Remote network name (computer name to connect) 
 UserName  String  yes  Empty string  Specifies a user name to be used in making the connection 
 Password  String  yes  Empty string  Specifies a password to be used in making the network connection 


This method calls WNetAddConnection2 Win32 API function.

Password If Password is NULL (vbNullString), the function uses the current default password associated with the user specified by UserName.

If Password points to an empty string, the function does not use a password.

If UserName is NULL (vbNullString), the function uses the default user name. The user context for the process provides the default user name.

The UserName parameter is specified when users want to connect to a network resource for which they have been assigned a user name or account other than the default user name or account.

The user-name string represents a security context. It may be specific to a network provider.

See also

Server.Connect, Server.GetKey

Other links for AddConnection

Methods of Server class

AddConnection, Close, Connect, ExpandEnvironmentStrings, GetKey, LogonUser, RevertToSelf

Properties of Server class

hKey, Keys, Name


Server/computer for the ActiveX regedit.
You can use GetKey method to get a specified key from the server.
Keys property returns a collection containing subkeys of a connected key (See Connect method).


Intuitive, easy to use COM interface to windows registry. Set of classes to read/enumerate/modify windows registry keys and values from ASP, VBS and T-SQL.

© 1996 - 2009 Antonin Foller, Motobit Software | About, Contacts | e-mail: