Set permanent variable in cmd

Mister Fox

New member
Member
Local time
5:15 PM
Messages
44
Location
A small town in Pennsylvania
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
PA - Pennsylvania
CPU
AMD Phenom(tm) II X6 1045T Processor
Motherboard
Gigabyte Technology Co., Ltd. GA-970A-UD3
Memory
16.00 GB
Graphics Card(s)
NVIDIA GeForce GT 430
Sound Card
(1) NVIDIA High Definition Audio (2) High Definition Audio
Monitor(s) Displays
Samsung Syncmaster 24" LED Monitor
Screen Resolution
1920x1080
Hard Drives
WDC WD5000AAKX-00ERMA0 ATA Device
Case
Tiveco Ghost Series GHO-001BL
Cooling
A really big fan
Keyboard
ASUS KB2621
Mouse
Logitech M305
Internet Speed
Far too slow
Antivirus
Microsoft Security Essentials
Browser
Google Chrome
it's been an hour, so...

BUMP
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
PA - Pennsylvania
CPU
AMD Phenom(tm) II X6 1045T Processor
Motherboard
Gigabyte Technology Co., Ltd. GA-970A-UD3
Memory
16.00 GB
Graphics Card(s)
NVIDIA GeForce GT 430
Sound Card
(1) NVIDIA High Definition Audio (2) High Definition Audio
Monitor(s) Displays
Samsung Syncmaster 24" LED Monitor
Screen Resolution
1920x1080
Hard Drives
WDC WD5000AAKX-00ERMA0 ATA Device
Case
Tiveco Ghost Series GHO-001BL
Cooling
A really big fan
Keyboard
ASUS KB2621
Mouse
Logitech M305
Internet Speed
Far too slow
Antivirus
Microsoft Security Essentials
Browser
Google Chrome
Use the Setx command: Setx
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
Back
Top