Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set environment variables in login script

Status
Not open for further replies.

alexs0628

MIS
Mar 25, 2002
82
US
I'm converting from a Novell 3.2 server to a Windows 2000 server. An applications needs an environment setting based on the user's login name. I can't get the login script in Windows 2000 server to work. The syntax in Novell is this:

if login_name="alexs" set console="101"
if login_name="johns" set console="102"

as so on. How do I set up windows 2000 to perform this login function?
 
windows provides the username as a variable...

%username%

 
I tried -
set username="%username

if username="alexs" set console="101"


but that didn't work either.
 
percent sign both before and after and you don't have to set it. It is already set.

if %username%='john doe'
...
 
I changed to %username%="alexs" set console=101

Still cannot run the app. The application is a DOS based program. If I go to the properties of the shortcut and enter set console=101 on the command line in the Program tab line, I can run the program. Otherwise, the program can not find the environment variable. I guess I will have to manually set the console at every user's desktop shortcut.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top