2018-01-18 12:35:36 +00:00
|
|
|
# set
|
|
|
|
|
|
|
|
> Display or set environment variables for the current instance of CMD.
|
2022-10-04 16:06:23 +01:00
|
|
|
> More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/set>.
|
2018-01-18 12:35:36 +00:00
|
|
|
|
|
|
|
- List all current environment variables:
|
|
|
|
|
|
|
|
`set`
|
|
|
|
|
|
|
|
- Set an environment variable to a specific value:
|
|
|
|
|
|
|
|
`set {{name}}={{value}}`
|
|
|
|
|
|
|
|
- List environment variables starting with the specified string:
|
|
|
|
|
|
|
|
`set {{name}}`
|
|
|
|
|
|
|
|
- Prompt the user for a value for the specified variable:
|
|
|
|
|
|
|
|
`set /p {{name}}={{prompt_string}}`
|