Avatar of OCUBE
OCUBE
Flag for United States of America

asked on 

How to set environmental variables in Windows 7 using a batch file ?


I have a Windows 7 PC and I wanted to set the environmental variables.

I know I can right click on MYCOMPUTER=> Advanced tab and set there SYSTEM EV.

But instead of doing that I wanted to write a windows batch file (.BAT) and do it.

How can I do that.

If i go to command line and use the SET command , is it only for that particular session, once we close and reopen another session the EV are no longer there.

I wanted to set the EV permanent, same way as what we do using GUI, but using a windows batch file (.bat).

Give me the commands or some sample script

Thanks in advance
Windows 7Microsoft DOS

Avatar of undefined
Last Comment
OCUBE

8/22/2022 - Mon