Skip to main content

Display or set environment variables for the current instance of CMD.

:: To list all current environment variables:
set

:: To set an environment variable to a specific value:
set name=value

:: To list environment variables starting with the specified string:
set name

:: To prompt the user for a value for the specified variable:
set /p name=prompt_string