Page 1 of 1 1
Topic Options
#45901 - 2003-09-23 06:00 PM Environment Variable and Current Script
sliver Offline
Getting the hang of it

Registered: 2002-09-05
Posts: 94
In our login scripts we are setting environment variables when a user first logs in but any command that uses the variable does not get executed until the second login.

IE.- SetL "UPDSERVER=Server"
? "%UPDSERVER%" ;shows nothing on first login


I am aware that env. variables that are set in a script are not available during the current kix session but is there a way to set an environment variable to make it available during that session so we do not have to log on and off again to get all the initial updates (our whole script pretty much uses this variable.)

I have also read to use shell or run with the dos set command but this does not seem to help in displaying the variable either.

[ 23. September 2003, 18:53: Message edited by: sliver ]

Top
#45902 - 2003-09-25 12:29 AM Re: Environment Variable and Current Script
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Do you have the same problem when you start the script from the command-line? If it isn't then try to start this part of your loginscript from the registry (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run or Runonce)
_________________________
Co


Top
#45903 - 2003-09-25 12:33 AM Re: Environment Variable and Current Script
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I think you have correct command.
but I think you have wrong kixtart version [Wink]

there was bug in that... in some version.
should be fixed with 4.21 (IIRC)
_________________________
!

download KiXnet

Top
#45904 - 2003-09-24 03:07 PM Re: Environment Variable and Current Script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
quote:
(our whole script pretty much uses this variable.)

This is easy... don't use the environment variable! Why pollute the environment if it is to be used by KiX? Use a KiX variable instead.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#45905 - 2003-09-24 03:33 PM Re: Environment Variable and Current Script
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
Or use both a kix variable & an environment variable. A change all can easily rename everything internal to your script.
_________________________
Jack

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.044 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org