Discussion Locked

Setting Enviroment Variables

0 helpful
11 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello,
I am curious if it is at all possible to set certain enviroment variables in Win9x machines. The issue deals with login scripts. I want these 9x machines to recognize the %username% & %os% variable. I don't mind if I have to go around to each 9x to set this up. I have a couple of 9x machines, I would like to switch them to a different O/S but we need them for certain applications. Thanks for your help

Pete

11 replies

by gutridgesj

those 2 particular env var you mention are already there in Win9x machines. I use them myself in login scripts.

drop to a DOS prompt, and type in
set > file.txt

then go look at the file you just created to see all the env that are set.do this when you are not logged in to the network and when you are so you see which ones are added once you log in

if you need more env var that are not already there, then use the set var=xxx in the autoexec.bat of each pc.

by leafs_fan

Thanks for the speedy response but unfortunatley your advice did not solve my problem. is there some sort of registry setting that I might have to add or adjust?

by leafs_fan

I guess the directions that were provided with the shareware were not helpful at all. I guess they were geared towards someone who has had 10-20 years DOS experience. I used the program and my 98 machine would not boot into windows. Thanks for the help though..

by gregory pleau

The %OS% variable should be there anyways, BUT you can always hard code it in the autoexec.bat. To get Win9x to use %username%, you need the 'setx' program from the Windows NT resource kit. This is because the environment variable only exists in thelogin shell and must be 'exported' from there in order for Windows 9x to see it.

by rvkempen

In the NT4 resource kit use kixtart.
Start the rpc service (kixrpc -install)
((Needed only for w95, 98 clients))
Then you can use macros as:
If @userid = "dumbo"
logout
endif

or functions like :
if ingroup( "god" )
use x: "\\superserver\c$"
endif

Download it at www.kixtart.org

Give my greetings to moderator Lon

Happy scripting.

Ron.

by rvkempen

In the NT4 resource kit use kixtart.
Start the rpc service (kixrpc -install)
((Needed only for w95, 98 clients))
Then you can use macros as:
If @userid = "dumbo"
logout
endif

or functions like :
if ingroup( "god" )
use x: "\\superserver\c$"
endif

Download it at www.kixtart.org

Give my greetings to moderator Lon

Happy scripting.

Ron.

This discussion is closed to new replies.