Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Set permanent variable in cmd


18 Jul 2012   #1

 
 
Set permanent variable in cmd

I am trying to find a way to set a variable in the cmd that is "permanent".

What I mean is that I could set the variable %message% to "hello", and I could close the cmd, open it up a week later and if I typed this:
Code:
echo %message%
This would be the result
Code:
hello
Using the normal SET command will only set the variable for the time the cmd is open. I need to set the variable within the system so that it will stay if I close the cmd.


My System SpecsSystem Spec
.

18 Jul 2012   #2

 
 

it's been an hour, so...

BUMP
My System SpecsSystem Spec
18 Jul 2012   #3

Windows 8 Core X64
 
 

Use the Setx command: Setx
My System SpecsSystem Spec
.


Reply

 Set permanent variable in cmd




Thread Tools



Similar help and support threads for2: Set permanent variable in cmd
Thread Forum
Variable SLEEP behavior. Performance & Maintenance
Very variable startup speed General Discussion
How do I confirm that my CPU cooler speed is variable ? Hardware & Devices
Solved Cannot find the system variable path. General Discussion
Solved Variable speed dvd burning Hardware & Devices
repeated variable bsods BSOD Help and Support
User Variable %username% Software

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 02:12 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33