General discussion

Locked

System Variables for local users

By rgrowcock ·
Does anyone know if it is possible in NT 4.0 to set system variables by the administrator that will automatically update for any new user that logs on? I had tried using the %USERNAME%, but that does not set the variable on the path, it only shows %USERNAME% instead of the person's name that is logged in. The local user can then append what is needed to the path, but if he closes the DOS window, the system resets and loses the appended statements.
I am trying to do this to alleviate theneed of having the local user reset everything everyday. And if a new use should take that machine over, if would update automatically.
I should also mention that the %username% variable does work for CLASSPATH, just not the PATH variable. Please help oh great NT Wizard. My humble thanks before hand.

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

System Variables for local users

by pVp In reply to System Variables for loca ...

Try putting this in c:\autoexec.bat as:

PATH=%USERNAME%...

This will append to the existing PATH as shown in My Computer->Properties->Environment.

From what you've seen already, it appears that %USERNAME% isn't available at the time you're using it; I don't know if my solution overcomes that.

Collapse -

System Variables for local users

by pVp In reply to System Variables for loca ...

Late thought: if this is done once in My Computer->Properties->Environment by (for) each user logged on, I think it's specific to that user's profile.

The use of %USERNAME% should not then be necessary.

Collapse -

System Variables for local users

by rgrowcock In reply to System Variables for loca ...

Thanks for the suggestion, unfortunately NT doesn't use the autoexec.bat file for booting. Also having the user change their own environments is what I'm trying to get away from. Thanks again for the input. Roger

Collapse -

System Variables for local users

by mike In reply to System Variables for loca ...

I can see problems with the way you are doing this... can you give me an example of the EXACT solution you are looking for, what happens if 10 users log on with out rebooting, your going to have a boat load of environment v's.. What is it exactly that you need. There are MANY methods of configuring the envrionment fairly easily but each has it's pros and cons.
Mike

Collapse -

System Variables for local users

by rgrowcock In reply to System Variables for loca ...

responder didn't get back with me. Sorry, no points given.

Collapse -

System Variables for local users

by rgrowcock In reply to System Variables for loca ...

I have a network of about 15 computers, all running NT 4.0, with 1 PDC (I am adding a BDC in the near future.) I have an engineering group of about 6 users within the network that I am trying to set the environments on. Each person only logs onto his own computer, so I don?t have multiple people logging into one specific computer.

What I am trying accomplish is this; have system environments that update automatically or dynamically if you prefer, for each person that MAY logon that computer. Say if someone new comes on board, or someone leaves and we assign that person?s old computer to someone new. I?ve tried using the %username% variable in path statement, but in the path it actually says %username% instead of the logged in person. The %username% variable has worked for many of the other variables that I have set, just not for the path statement. I?ve tried different variations of the statement, with a ?\? and without it, uppercase, lowercase, mixed upper and lower case. Where the variables are updating, case doesn?t matter.

The paths that I am trying to update involve the location of some software that we write. I?m not able to give the exact name out due to the nature of my company, so I will have to improvise a little with the names, but the intent will be the same. This is what needs to be updated for each new user that logs in:
%username%(pointing to logged in user)\maindirectory(where the actual files reside)\filename\win32.
%username%(pointing to logged in user)\ maindirectory(where the actual files reside)\differentfilename\win32.

This is what I?m trying to accomplish, and I hope that I have made my problem clear enough so that you understand what I want to do. If not, please feel free to email me at r.growcock@emwerks.com and I can try to explain it a little further. Thanks for your help! Roger

Collapse -

System Variables for local users

by rgrowcock In reply to System Variables for loca ...

This question was closed by the author

Back to Windows Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums