#29658 - 2002-09-25 08:46 PM
Set Env variable not working
|
TRL
Lurker
Registered: 2002-09-25
Posts: 3
|
I want to set an enviromental variable on my NT4 and W2K workstations when they login from my NT4 server. I'm using this
set BLAH=SUBSTR(%computername%, LEN(%computername%) - 4, 4)
to set Blah = the last 4 charecters of the computername but it doesn't work, why???
|
Top
|
|
|
|
#29662 - 2002-09-26 05:03 PM
Re: Set Env variable not working
|
TRL
Lurker
Registered: 2002-09-25
Posts: 3
|
Thanks for your help on this. It's one of those projects you're suddenly presented with that requires that you master a complex subject in next 24 hours. So when I ask questions you assume I'm an idiot.
The variable is required by our SQL hotel system application. They have asked us to set this variable in System\Enviromental Variables for each workstation. Well, I'm lazy and I don't want to do this on 200 workstations.
I tried some of your ideas. The trouble is I'm trying to verify the success of the script by opening a command prompt and entering the set command. I don't see the variable. You may tell me I can verify it within the KIX context but how do I know the application is aware of it? It seems to me that I have to see it within the SET context.
But then I'm an idiot with 18 hours of knowledge on the subject of KIX.
Thanks, Tim
|
Top
|
|
|
|
#29663 - 2002-09-26 05:04 PM
Re: Set Env variable not working
|
TRL
Lurker
Registered: 2002-09-25
Posts: 3
|
Sorry that should read, "you CAN assume I'm an idiot". Tim
|
Top
|
|
|
|
#29665 - 2002-09-26 05:30 PM
Re: Set Env variable not working
|
Richard H.
Administrator
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
A way to check if it is all OK in the local environment is:
code:
SETL "TESTVAR=foo" SHELL "%COMSPEC%"
That'll start a child DOS session that you can check for TESTVAR.
I've used SETL as I'm testing on a Win95 box.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 507 anonymous users online.
|
|
|