Unexpected retrieved value in Environment Varaibles



I'm getting mixed and unexpected values when trying to retrieve an
environment variable I had created. Hopefully someone can see what
I've missed.

From code I've found in the forums, I've pieced together a quick and
dirty little hardware inventory script that I call from the main login
script. (All the scripts are VBS.)

In the main script I set an environment variable indicating which
office the user is connecting from.

objWSS.Environment("VOLATILE")(EnvVarName) = EnvVarValue
where for example EnvVanrName = "Location" and EnvVarValue =
"Toronto".

The invenory routine retrieves the environment variable with
getEnviroVar = objShell.ExpandEnvironmentStrings("%" & EnvVar
& "%")
and writes it to a text file. One file per user login. The file gets
replaced each time the user logs in. Items are TAB delimited.

I then have a third vbs script that opens all the little text files
and inputs the ReadLine into an Excel spread***.

Everything looks great. Except that darn office indicator.

Some desk give the location and some give the variable:

WPGENGDPETER-S Microsoft Windows XP Professional Intel(R)
Pentium(R) 4 CPU 3.00GHz Winnipeg
WPGAGEDKAREN-H2 Microsoft Windows XP Professional Intel(R)
Pentium(R) D CPU 3.40GHz %MCWlocation%


Anyone have any ideas?

Marten
.