Windows 7 Forums


Windows 7: Set permanent variable in cmd

18 Jul 2012   #1

PA - Pennsylvania
Somewhere over the rainbow
 
 
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

PA - Pennsylvania
Somewhere over the rainbow
 
 

it's been an hour, so...

BUMP
My System SpecsSystem Spec
18 Jul 2012   #3

Windows 7 Pro X64
Space Coast of Florida
 
 

Use the Setx command: Setx
My System SpecsSystem Spec
.


Reply

 Set permanent variable in cmd problems?



Thread Tools



Similar help and support threads for: Set permanent variable in cmd
Thread Forum
accidentally deleted PATH variable General Discussion
Path Variable For Installing Dig Instead OF Using NSLookup Software
Solved Variable speed dvd burning Hardware & Devices
repeated variable bsods BSOD Help and Support
User Variable %username% Software


All times are GMT -5. The time now is 07:51 PM.


Seven Forums Android App Seven Forums IOS App Follow us on Facebook

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
  

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