Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I bet you can't answer this one!!! Environmental variables don't work.

Status
Not open for further replies.

lyonmt

IS-IT--Management
May 18, 2001
83
0
0
I have a windows 2000 server and Windows 98 workstations. The workstations log into the 2000 server. I use a combination Kixstart script and batchfile. Everything works fine, EXCEPT environment variables.

I can open a command prompt on the server and the variables work. i.e. "echo %USERNAME%" will disply "administrator". But they do not work in the scripts. Does anybody know how to get them to work? I thought it might have something to do with 98, so I setup a Windows 2000 workstation and got the same results.
 
In w95-98 I think there are a "set" environment size.
I cannot remember the command to adjust this environment size, but I know there is one.
Perhaps this can be the problem?
 
I'm using this command and it work fine in Nt workstation but not in w95/98. I must use a third party batch file enhancer (PUTINENV.EXE v. 2.13)

If you need it send your email adresse, i will send a copy of this freeware
 
Thank you very much S D Anderson and SDELISLE, I will give it a try.
 
You can't do that. It's impossible to setup environment variables in W9x using the logon script. You can't even change the values of a variable created in autoexec.bat. If you try to, the contents of that variable will be restored as soon as the logon script finish.
 
Bifa,

That's the beautiful thing about this business. You learn something new at least once a day...

@echo off
if exist c:\windows\system\winset.exe goto first
copy z:\winset.exe c:\windows\system:first
if exist c:\windows\putinenv.exe goto second
copy z:\putinenv.exe c:\windows
:second
c:\windows\putinenv.exe L
NET USE G: \\ServerX\APP
NET USE L: \\ServerX\Capability
NET USE N: "\\ServerX\Workstation Images"
NET USE P: "\\ServerX\Installation Programs"
NET USE S: \\ServerX\Share
NET USE Y: \\ServerX\Public
NET USE H: \\ServerX\%username%


This is what I'm using and it works great! Thank you everybody!!! [bigcheeks]

You should be very proud of yourselfs, it took me a couple of posts to get this answer.

New question: Will this work with A.D. Groups?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top