From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Wed, 15 Nov 1995 14:49:43 -0800 (PST) From: Bobby Seder - PacifiCare Health Systems Subject: Re: Problem with ENV variables In-Reply-To: <951115140240.204001ac@uvphys.phys.UVic.CA> The reason why you cannot do this, is NT does not allow a environmental variable to hold another environmental variable. Nested env variables are not allowed. %mosaic.ini% cannot have another env var within it. To prove this, type ECHO %USERNAME% SET TEST=%USERNAME% then ECHO %TEST% You get %usename% don't you. The solution is to somehow call Mosaic (I don't use it and don't know the command line options) with a command line parameter that points to c:\users\%username%\mosaic.ini for the config file. The alternative is to NOT have any mosaic.ini's in the Systems path and make a login script that will add "c:\users\%username%" to thier path... That way when they start the app, it will look in the path for an INI and find it in the users directory. On Wed, 15 Nov 1995, Nik Zapantis, UVic Physics, Victoria BC (604)721-7729 wrote: > Date: Wed, 15 Nov 1995 14:02:40 -0800 (PST) > From: Nik Zapantis, UVic Physics, Victoria BC (604)721-7729 > To: ALPHANT@GARPLY.COM > Cc: ZAPANTIS@phastf.phys.UVic.CA > Subject: Problem with ENV variables > > Hi all, > > I have an Alpha 200 4/100 WNT 3.51 system and I am having a problem with the > setting of an env. variable. > I am trying to define the MOSAIC.INI file to point to a user's directory. > >From the Control-panel--system I set up the global variable MOSAIC.INI to > point to C:\users\%USERNAME%\mosaic.ini > Click on set and the variable is set to C:\users\current-user-name\mosaic.ini > Windows NT diagnostics-->Environment also show the variable correctly set. > > The problem is that Mosaic does not see it and it cannot find the mosaic.ini > file. > Also, if I open a command window (MSDOS) and do a SET or ECHO %MOSAIC.INI% > I get > C:\users\%USERNAME%\mosaic.ini > returned. > It appears that the %USERNAME% variable is not correctly substituted. > If I redefine the MOSAIC.INI variable in the command window, the variable now > reflects the correct path. > It looks as though the %USERNAME% is not defined when the MOSAIC.INI is > declared. > Is this what is causing the problem, or am I missing something? > > BTW, for now, I have forced mosaic to use the proper mosaic.ini file by using > the -i switch at the command line. > > thanks, > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > | Nik Zapantis | zapantis@uvphys.phys.UVic.CA | > | Dept. of Physics & Astronomy | 45393::zapantis(HEPnet/SPAN) | > | University of Victoria | http://info.phys.UVic.CA/ | > | PO BOX 3055, MS 7700 | | > | Victoria, BC | Phone: (604)721-7729 | > | V8W 3P6 | FAX: (604)721-7715 | > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > Bobby Seder (bseder@raven.phs.com) Windows NT Systems Manager ------------------------- PacifiCare Health Systems 5995 Plaza Drive M/S 3101 Cypress, CA 90630-5028 714-236-7148 714-236-7882 fax