Novell Home

How to Register a Workstation

Novell Cool Solutions: Feature
By Brian Vaughn, Jayne Mooney

Digg This - Slashdot This

Posted: 4 May 1999
 

One of the truly cool values of ZENworks is the ability to represent all those boxes on your network as objects in NDS. Stop and think about what that means for a minute: You won't have to embark on a pilgrimage to the nether regions of your company to get information about some troublesome PC. Now, with ZENworks Workstation objects, you can, from the comfort of your own office, look up a workstation's vital statistics with a few clicks in your NDS tree. Is the Directory awesome, or what?

Before You Begin
We highly recommend you at least read (and complete, if possible) the steps required for ZENworks setup. To view or print these setup instructions:

1. Install ZENworks.

2. Launch NetWare Administrator (nwadmn32.exe).

3. Choose Help > Help Topics > ZENworks > Setting Up ZENworks.

4. View or print these topics:

Set Up ZENworks
Set Up Workstations for ZENworks

Topic Overview
Before you can realize the benefits of ZENworks, of course, you need to first register those workstations in the container where the User object resides. Registering a workstation involves the following tasks:

Granting User Rights to Register Workstations
Registering Workstations for Importation
Creating and Associating a Workstation Import Policy to a User
Importing the Registered Workstations
Re-registering Workstations

These two sections explain some management tasks pertaining to registered workstations:

Un-registering Workstations or Starting Over
Moving or Renaming Workstation Objects in the Tree

Granting User Rights to Register Workstations
Before the workstation registers to the user's container, you need to prepare the NDS container.

To prepare a container for registration, do one of two things:

1. Run WSRights.exe during install.
2. Using NetWare Administrator (NWAdmn32), highlight a container and then choose Tools > Workstation Utilities > Prepare Workstation Registration. Once you have selected this option, the container is ready for workstations to begin registering.

[Back to Top]

Registering Workstations for Importation
You can register a workstation for importation in one of three ways:

1. Install the Z.E.N.works client. This is the automated way of registering a workstation.
2. If you don't have the Z.E.N.works client, then you can run WSREG.EXE from a login script.
3. Run the WSREG Application object using the Application Launcher (NAL).

What is the Workstation Agent?
What Does the Workstation Registration Agent Do?
How Does the Workstation Registration Agent Know Which Workstation Object Belongs to the Workstation on Which It Is Running?

[Back to Top]

What is the Workstation Agent?
The workstation registration agent comes in two forms: WSREG.DLL and WSREG16.EXE.

WSREG.DLL is the workstation registration agent for WIN32 platforms. WSREG.DLL can run in the Workstation Manager scheduler, or it can be run with WSREG32.EXE in a login script or through NAL. It has a resource DLL, named WSREG32R.DLL, that it uses to get internationalized resource strings. If WSREG.DLL cannot locate the resource DLL, the WSREG32.LOG file will be blank.

WSREG.DLL looks for the WSREG32R.DLL in the same directory from which the workstation registration agent is run. If WSREG32R.DLL is not there, WSREG.DLL looks for it in the \NLS\ directory. Finally, if it can't find it in the \NLS\, it will search the Environment Path settings.

After the workstation registration agent runs, at the root of the workstation's first local drive (most cases C:), a WSREG32.LOG file will be created. This file shows what the workstation registration agent did. If errors or problems occur, look at the WSREG32.LOG file to determine why a workstation didn't register or to determine why certain Workstation object attributes are not being updated correctly.

WSREG16.EXE is the second form of the workstation registration agent. WSREG16.EXE can be executed on a DOS or Windows** 3.1 workstation. Like WSREG.DLL, the WSREG16.EXE will write out a log file named WSREG16.LOG to the first local drive found. It will have all the same information that is found in the WSREG32.LOG.

Under DOS, WSREG16.EXE uses the resource file WSREG16R.MSG. This file, like WSREG32R.DLL, has internationalized strings and is needed for WSREG16.LOG to be able to display messages. WSREG16.EXE uses the same search mechanism for finding the WSREG16R.MSG file as WSREG.DLL uses to find WSREG32R.DLL.

Under Windows 3.1, WSREG16.EXE creates the WSREG16.LOG file (just as it does when it is run under DOS), but the resource file is named WSREG16R.DLL. WSREG16R.DLL works the same as the other two resource files previously explained (WSREG32R.DLL and WSREG16R.MSG).

[Back to "Registering"]

What Does the Workstation Registration Agent Do?
The workstation registration agent's priority is to get the workstation registered for importation (creating a Workstation object in an NDS tree) and then associate the physical workstation with the Workstation object in the tree after the workstation has been imported. It then will update the following Workstation object information: Network Addresses, User History, Last User, Last Server, and Last Registered Time. If the workstation registration agent can't find the workstation in the tree, it determines whether the workstation has been MOVED or RENAMED. We will discuss moving and renaming later in this document.

[Back to "Registering"]

How Does the Workstation Registration Agent Know Which Workstation Object Belongs to the Workstation on Which It Is Running?

Under Windows NT and Windows 95 and 98, the Distinguished Name of the Workstation object is written to the Registry, where you can find the registration cookie also. This area is located at:

HKEY_LOCAL_MACHINE
\Software
\Novell
\Workstation Manager
\Identification

In this area you will find five values that the workstation registration agent uses:

1. The first value is the EXE Path. This will be used in future releases.

2. The second value is Registered In, which is used as a reference point for the workstation registration agent.

3. The third value is the Registration Object, which is the workstation registration cookie that is written to the container's Register Workstation attribute. The registration cookie looks something like this:

1:BrianD, 01010480:00c04fd8eee2, 137.65.61.85, BrianD.NS.Novell.com, BriansWorkstation, PRV-FLY,WINNT,PENTIUM

The first field is the name of the user who is logged in and is registering. The next field is the IPX address, followed by the IP address. The fourth field is the DNS Name, followed by the computer name, primary server, os type, and finally the type of CPU the workstation has. If the workstation registration agent cannot find a piece of information for one of these fields, the field is left blank. The information in the registration cookie is then used as NAMING VALUES for the actual importation and naming of the workstation.

4. The fourth value is the Tree. Under NT, the Trusted Tree can be set while installing the Z.E.N.works client, or you can right-click the Network Neighborhood and select Properties > Novell Workstation Manager > Properties.

You will see a place to enter a Trusted Tree. Under Windows 95, 98, and 3.1 platforms, the Tree value is set when the workstation registration agent runs for the first time. The workstation registration agent will use the primary tree as the Tree value. This value then becomes the Trusted Tree for the workstation to use.

5. The fifth and final value is Workstation Object. This value is the fully Distinguished Name of the Workstation object. When a Workstation object can be located by the Distinguished Name and the Tree name in the workstation Registry, the workstation is then associated. Under DOS and Windows 3.1, a hidden, system file called WORKSTAT.ID is created. This file maintains all the same information that the workstation registration agent writes to the Registry.

[Back to "Registering"]

Creating and Associating a Workstation Import Policy to a User
Before you can import a workstation into the tree, you first need to create and associate a Workstation Import Policy to the user. To do this using Z.E.N.works 1.0 (Full Product or Starter Pack Version), follow these steps:

1. Launch NetWare Administrator (nwadmn32.exe) and select the Organization or Organizational Unit where you want to store Z.E.N.works Policy Packages.

2. Right-click the Organization or Organizational Unit, and then choose Create > Policy Packages > OK.

3. Choose to create the User Policy Package that corresponds to your users' operating systems (Windows 3.1, Windows 95, or Windows NT) . For example, if you need to support one or more users who are using Windows 95 workstations, choose 95 User Package. If you support multiple platforms, create a User Policy Package for each platform.

4. Give the User Policy Package a name that is meaningful to you.

5. Choose the location where you want the policy package.

6. From the Policies list, check the Workstation Import Policy and choose Details.

7. Choose Workstation Location page, and then choose the container where you want the Workstation object to be created. If you want Workstation objects in the same location as the User objects, then accept the default User Container. If you want to change the location, choose Selected Container and browse for a location.

8. Choose Workstation Name page, choose how you want the workstations named, and then choose OK. The Workstations will be named according to the items in the list. If you accept the default, then your Workstations will be named as follows:

*Computer + Network Address for Windows 95 or NT workstations
*User + Network Address for Windows 3.1 workstations

9. Associate the User Policy Package you created in the previous steps with a User, Group, or container whose workstation you want to manage with this Policy Package:

a. In the User Policy Package, choose the Associations page.

b. Choose Add, and then browse for the object you want to associate with.

c. Choose OK twice to save changes and return to the tree view.

[Back to Top]

Importing the Registered Workstations
You can schedule imports to occur automatically using the Application Launcher or the Scheduler, or you can import workstations manually from the Tools menu or the command line. You can also import Workstations on a container-by-container basis (with or without sub-containers), or you can choose to import selected Workstations.

Note: After completing any of these options, you must run the Workstation Registration program again following the import to complete the registration process and synchronize the workstation with NDS.

Importing Selected Workstations Manually
Scheduling Automatic Imports Using the Scheduler
Importing Groups of Workstations Manually Using Tools Menu
Importing Groups of Workstations Manually Using Command Line

[Back to Top]

Importing Selected Workstations Manually
You can selectively import workstations by selecting workstation entries on the Workstation Registration page of a container.

1. Ensure you have completed the steps outlined in the "Set Up Z.E.N.works" help topic.

2. Launch NetWare Administrator (nwadmn32.exe).

3. Highlight the container where the User objects reside whose workstations you want to import.

The container must be associated (either directly or indirectly) with the User Policy Package (Windows 3.1, Windows 95-98, or Windows NT) you created previously.

4. Choose Details > Workstation Registration.

5. Select the registered workstations you want to import.

6. Choose Import Workstations. The import is complete at this point, and the Workstation objects are displayed in the tree (after you refresh the view of the container).

7. Choose Cancel to close the container's Details.

8. View the new Workstation objects in the tree.

9. Collapse the container, and then open it again to refresh the list.

10. View the workstations you imported in step 5.

Note: The Workstation objects are created in the context specified in the Workstation Import Policy found in the associated User Policy Package.

[Back to "Importing"]

Scheduling Automatic Imports Using the Scheduler
If you use Desktop Management features, you can schedule the Import process by creating a scheduled action for wsimport.exe.

The scheduled action should include the .exe name, the context of the container you want to import to, and any command line parameters you might want to use.

For example, if your context were USERS.ORG and you didn't want to include subcontainers in the import session you were creating the scheduled action for, you might enter the following as your scheduled action target:

Z:\public\wsimport.exe "users.org" /s-

Note: Enter wsimport.exe /? at the command line to view the available parameters.

[Back to "Importing"]

Importing Groups of Workstations Manually Using Tools Menu
1. Ensure you have completed the steps outlined in the Set Up Z.E.N.works help topic.

2. Launch NetWare Administrator (nwadmn32.exe).

3. Highlight the container where the imported Workstations will reside (the container the registered workstation is associated with).

4. Choose Tools > Import Workstations.

5. Choose [...] to browse and choose the container from which you want to import registered workstations.

6. Choose OK to complete the Import process.

Note: The Workstation Registration program must run again following the import to complete the registration process and synchronize the workstation with NDS.

7. Close and reopen the browser to view the latest imported workstations in the applicable list (such as Valid Network Addresses).

[Back to "Importing"]

Importing Groups of Workstations Manually Using Command Line
1. Ensure you have completed the steps outlined in the Set Up Z.E.N.works help topic.

2. Launch NetWare Administrator (nwadmn32.exe).

3. On the command line, enter the .exe, the context to the container you want to import to, and any command line parameters you want to use. For example, you might enter the following on the command line:

Z:\public\wsimport.exe "users.org" /s-

if your context is USERS.ORG and you don't want to include subcontainers in the import session you are creating the scheduled action for.

Note: Enter wsimport.exe /? at the command line to view the available parameters.

[Back to "Importing"]

Re-Registering Workstations
This last task serves two purposes: getting the physical workstation associated to the newly created Workstation object in the tree, and keeping the Workstation object attributes updated with some changes to the workstation.

1. Remember, for a workstation to be associated to a Workstation object in the tree, the distinguished name needs to be written to the Registry (WIN32 client) or the workstat.id (WIN16/DOS client) file in the Workstation Object value field. That fully distinguished name found in the Workstation Object field is what Z.E.N.works programs use to identify which Workstation object in the tree to update or modify.

2. To complete the last step and associate the physical workstation with a Workstation object in the tree, the WSREG.DLL (Win32) or WSREG16.EXE (Win3.1/DOS) must run a second time after an importation has been completed. How you register determines how you will finish this last step.

For example. . .if you have installed the new Z.E.N.works client and use the Workstation Manager's scheduler to run the workstation registration agent (WSREG.DLL) under Windows NT, the Workstation Manager's scheduler will run WSREG.DLL every five minutes until the workstation registration agent can find the Workstation Object or fully distinguished name of the newly created Workstation object. Under Windows 95 and 98, the WSREG.DLL is run at the beginning of every cold login. (Cold login: logging in after starting up the workstation. Warm login: already logged in, and using the NetWare login utilities to log in again.) A warm login won't trigger the workstation registration agent to run in the scheduler. A cold login triggers the workstation registration agent to run. Under Windows 3.1, you must reboot and log in since the workstation registration agent is run in the login script.

Or, if you are not using the new Z.E.N.works client and are running the workstation registration agent in the login script, you will need to reboot and log in again. This applies to all platforms.

If, on the other hand, you are not using the new Z.E.N.works client and are using the Application Launcher, you will need to schedule a time for the workstation registration agent to run again.

2. The workstation registration agent, as mentioned above, actually serves two purposes: It gets the workstation created in the tree and associated, and it also updates certain Workstation object attributes in order for other applications to work.

For example, the physical workstation can have the IPX address changed by replacing the old network card with a new network card or even have the IP address change periodically through DHCP. Keeping the workstation's network addresses up to date is vital for some applications, such as Remote Control. Because of this, you should run the workstation registration agent periodically, at least at every login, with one exception: the Windows NT workstation scheduler. In this case, after the workstation is associated to the Workstation object in the tree, the scheduler will not run the workstation registration agent again, and the scheduler will make all workstation updates that are needed, including the updating of the network addresses for the workstation.

The only time the Windows NT workstation scheduler will run the workstation registration agent again is if you move or rename a Workstation object or remove a Workstation object from the tree. In all other cases, the workstation registration agent is run at login or scheduled in the Application Launcher.

Other attributes that are updated by the workstation registration agent are as follows: User History, Last User, and Registered Time. The User History is a list of users who have modified the Workstation object by running the workstation registration agent. For example, the Last User is the user who modified the Workstation object last by running the workstation registration agent. The Last Registered Time is set every time the workstation registration agent runs and shows the last time the workstation registration agent ran on the workstation.

[Back to Top]

Un-Registering Workstations or Starting Over
You can un-register and start over in these three ways:

1. Run unreg32 (95, 98, or NT) or unreg16 (3.1) at the workstation.

2. Delete the Workstation object from the tree.

3. Remove the registration cookie from the workstation registration page.

Each method is described in more detail here:

1. If the workstation you are going to un-register is Windows 95, 98, or NT, run unreg32.exe at the workstation. If it is a Windows 3.1 workstation, then run unreg16.exe. When unreg32.exe is run on an NT workstation, the wsreg32.log is deleted and the Registry settings found at:

HKEY_LOCAL_MACHINE
\Software
\Novell
\Workstation Manager
\Identification

. . .are deleted, except for the Tree, which is the trusted tree that is set in workstation manager. If you want to change the tree name, set it through workstation manager by going into the Properties page for the Network Neighborhood. Select Novell Workstation Manager and click Properties. You can change it there.

Under Windows 95 and 98, unreg32.exe will delete the wsreg32.log and the workstat.id file along with all the settings, including the Tree value, in the Registry located at:

HKEY_LOCAL_MACHINE
\Software
\Novell
\Workstation Manager
\Identification

The workstat.id file under Windows 95 is a special case and is only used for Remote Control purposes. It is basically a copy of the Registry at:

HKEY_LOCAL_MACHINE
\Software
\Novell
\Workstation Manager
\Identification

. . .and is treated as such under 95. Under Windows 3.1, the wsreg16.log is removed along with the workstat.id file.

After the workstation has been un-registered, the workstation is ready to be registered and imported again.

2. You can also un-register a workstation by removing the Workstation object from the tree. If the Workstation object is removed from the tree, the workstation registration agent will create a new registration cookie and will re-register for importation. It is important to note here that the workstation registration agent will only re-register for importation if the workstation has a DS Authenticated connection to the Trusted Tree or the tree where the workstation should be. If the workstation ever logs in to a different tree and does not have a DS Authenticated connection to that Trusted Tree, the workstation registration agent will not un-register but will maintain its identity.

3. The third way to un-register a workstation is to remove the registration cookie from the workstation registration list found in the workstation registration page on a container. By removing the registration cookie, the workstation registration agent will create a new registration cookie and will register it to the user's location in the tree.

Note: If you are part of an IS group that works on the workstation boxes in your own area and then sends them back to the users, you must prepare your container for importation. Otherwise, the registration will never happen, and users will get workstations that have not been registered.

[Back to Top]

Moving and Renaming Workstation Objects in the Tree
As long as a workstation is moved or renamed with nwadmin32 that has the Z.E.N.works snap- ins, the snap-ins will capture the rename and move commands for a Workstation object and write the changes to the container's workstation tracking attribute. You can view this list by going to the container details and selecting the workstation tracking page.

Basically, as a workstation is moved and renamed, a trail is left behind to show where the workstation resides. This trail is found in the container's workstation tracking attribute. After the Workstation object has been renamed and moved, the next time the workstation registration agent runs on the workstation, the workstation registration agent will first determine if the workstation is still in the tree. If the Workstation object is not found in the tree, it will read the workstation tracking attribute and follow the trail to the new workstation name or place. As it follows the trail, the workstation registration agent also removes the trail from the attribute, thereby cleaning up the workstation tracking.

Once it finds the new name or place, the workstation registration agent will write the new distinguished name down to the workstation Registry, and the workstation is then associated with the Workstation object in the tree. If the workstation registration agent doesn't find the workstation, it will re-register for importation.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell