AlphaNT: Windows NT on Alpha (1995-2000)
 help / color / mirror / Atom feed
* Problem with ENV variables
@ 1995-11-15 22:02 Nik
  1995-11-15 22:49 ` Bobby Seder - PacifiCare Health Systems
  0 siblings, 1 reply; 2+ messages in thread
From: Nik @ 1995-11-15 22:02 UTC (permalink / raw)


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.
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          |
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problem with ENV variables
  1995-11-15 22:02 Problem with ENV variables Nik
@ 1995-11-15 22:49 ` Bobby Seder - PacifiCare Health Systems
  0 siblings, 0 replies; 2+ messages in thread
From: Bobby Seder - PacifiCare Health Systems @ 1995-11-15 22:49 UTC (permalink / raw)


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 <ZAPANTIS@phastf.phys.UVic.CA>
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1995-11-15 22:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-11-15 22:02 Problem with ENV variables Nik
1995-11-15 22:49 ` Bobby Seder - PacifiCare Health Systems

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox