FR 
 
Site navigation



User Management Resource Administrator: User Account Management for Windows 2003/XP/2000/NT

Previous Topic

Next Topic

Book Contents

Script section: Connecting to the UMRA Service

The database connection is not initialized. For each record returned from the database, a user account must be created. Before the loop to create the accounts is implemented, a connection must be setup with the UMRA Service. This is done by creating the Umra COM object of UMRA COM and calling the Connect method of the object.

Dim Umra, Username, UserPassword

Set Umra = CreateObject("UmraCom.Umra")

RetVal = Umra.Connect("AMAZONE", 56814)

First, the variables are declared. The Umra variable will hold the COM object. The variables Username and UserPassword will hold the text values of the user name and password for the created user account. The values will be shown to the end user

The UMRA COM object Umra is then created with the CreateObject call. The argument UmraCom.Umra specifies the UMRA COM library and the type of object (Umra) of which an instance must be created. If the UMRA COM library is not installed and/or registered, the CreateObject call will fail.

The UMRA COM object now connects to the UMRA Service with the statement RetVal=Umra.Connect("AMAZONE",56814). The Connect method takes two arguments: the name of the computer that runs the UMRA Service and the port number used by the UMRA Service. 56814 is the default UMRA Service port number.

On success, the return value of the Connect method is zero. The UMRA COM object is now connected to the UMRA Service.

See Also

Visual Basic script

Visual Basic Script

Script section: Setting up the database connection

Script section: Executing projects on UMRA Service

Testing and executing the script


Home | Products | Support | Pricing | Download | Press | About Us | Contact | Sitemap
QUICK LINKS: Mass / Bulk Import Software | Network Monitoring Software | Disk Quota Management
QUICK LINKS: User and Active Directory Management | Active Directory Migration | SSRPM Documentation