Dos - SETX

Card Puncher Data Processing


The setx command will set an environment variable for the scope of the terminal. Once the terminal is closed, the value is no more available.


For the example below to work, you need to have the permission to set a variable. Run your terminal in Administrator mode then.

The following

setx HOME_PERFTOOL D:\perftool
SUCCESS: Specified value was saved.

will create and set the environment variable HOME_PERFTOOL to the value D:\perftool


The setx command Creates or modifies environment variables in the user or system environment. Can set variables based on arguments, regkeys or file input.


setx /?


The data being saved is truncated to 1024 characters

WARNING: The data being saved is truncated to 1024 characters.
SUCCESS: Specified value was saved.

Just use the Windows - Environment Variable to change it otherwise you need to send WM_SETTINGCHANGE (but it's not possible in DOS)

Discover More
Card Puncher Data Processing
Dos - (Environment) Variable

How to manage variable in dos. A variable name: must only be made up of: alphabetic characters, numeric characters and underscores, cannot begin with a numeric character. cannot be...
Oracle Database 12c Step 12
Oracle Database - 12c Installation on Windows 64 bit

Installation of Oracle Database 12c ( on Windows. You can download the oracle software from OTN or better...

Share this page:
Follow us:
Task Runner