Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 881 Bytes

File metadata and controls

42 lines (28 loc) · 881 Bytes

Playground for windows environment

setx VAR1 "hello world"

Use chocolately helper function.

RefreshEnv

Testing if we can read this.

echo %VAR1%

Get all variables.

SET

Read directly from registry

REG query HKCU\Environment

Helper for deleting variable.

REG delete HKCU\Environment /F /V VAR0

Useful resources: https://stackoverflow.com/questions/13222724/command-line-to-remove-an-environment-variable-from-the-os-level-configuration

https://superuser.com/questions/1179433/how-to-list-global-environment-variables-separately-from-user-specific-environme

https://stackoverflow.com/questions/171588/is-there-a-command-to-refresh-environment-variables-from-the-command-prompt-in-w