General discussion

Locked

Setting Enviroment Variables

By Leafs_Fan ·
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

This conversation is currently closed to new comments.

11 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Setting Enviroment Variables

by gutridgesj In reply to Setting Enviroment Variab ...

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.

Collapse -

Setting Enviroment Variables

by Leafs_Fan In reply to Setting Enviroment Variab ...

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?

Collapse -

Setting Enviroment Variables

by Shanghai Sam In reply to Setting Enviroment Variab ...

The free XSET program may benefit you. Homepage: http://xset.tripod.com/index.html

-Ed

Collapse -

Setting Enviroment Variables

by Leafs_Fan In reply to Setting Enviroment Variab ...

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

Collapse -

Setting Enviroment Variables

by Gregory Pleau In reply to Setting Enviroment Variab ...

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.

Collapse -

Setting Enviroment Variables

by Leafs_Fan In reply to Setting Enviroment Variab ...

Thanks for the help. It worked great!

Collapse -

Setting Enviroment Variables

by rvkempen In reply to Setting Enviroment Variab ...

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.

Collapse -

Setting Enviroment Variables

by Leafs_Fan In reply to Setting Enviroment Variab ...

Thanks for the help, unfortunatley it didn't help me.

Collapse -

Setting Enviroment Variables

by rvkempen In reply to Setting Enviroment Variab ...

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.

Collapse -

Setting Enviroment Variables

by Leafs_Fan In reply to Setting Enviroment Variab ...

Poster rated this answer

Back to Windows Forum
11 total posts (Page 1 of 2)   01 | 02   Next

Related Discussions

Related Forums