Discussion Locked

Setting Win2000 Enviromental Variable fo

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have an ODBC Driver which utilizes the FLEXLM License manager by Globetrotter. It must be installed by an Administrator or a user with Administrative rights.

The problem is that when a non-administrator utilizes the driver I get a licensing error (can't find license file located in folder C:\FLEXLM). The solution provided by Globetrotter (the ODBC vendor was useless) was to add a User Enviromental Variable with a path to the file. The solution works - one user at a time. Using CITRIX Metaframe XP on a Win2000 server where I have multiple users logging into the same box - it becomes a pain.

My question is; how can I add an Envoromental Variable to the Default User profile so that ANY (new)user who logs on to the PC will have access to the variable.

Thanks in advance.

5 replies

by joseph moore

I have 2 options for you, providing you use login scripts:
Ok, so say the environment variable is called FLEXLM and the path it has to point to is C:\FLEXLM.
YOu can either
1) use the SET command to define the variable like this:
SET FLEXIM=C:\FLEXIM

or 2) set up a REG file with the piece of the REgistry that contains the variables. For this one, the variables are in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
Anything you add in this branch of the Registry will be a variable. So, if you have a REG file (call it FLEXLM.REG) that contains the following:

REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]
"FLEXLM"="C:\\FLEXLM"

Copy this REG file into the same location as your login scripts. Then in the login scripts, have the following:
CALL REGEDIT /S FLEXLM.REG

That will silently import the REG file into the workstation the user is on.

Doing either method will set up the variable for the user.

Now, if you don't run login scripts, then justmake a BAT file with the SET command in it all by itself, and either have users double-click this file (if it is on the Desktop for example) or put it in the Startup folder of each system.hope this helps

by yuval

You don't have to play with the registry...

replace the shortcus with a small batch file or vbscript the set the env. variable for you.

or

you can insert a batch file that sets the requiered varieble to the "all users" startup folder on the start menu.

This discussion is closed to new replies.