xxxxxxxxxx
set varname
set varname=value
set varname=
set
xxxxxxxxxx
set varname Display the value of the variable
set varname=value Set or change the value of the variable (Note: no space before and after '=')
set varname= Delete the variable by setting to empty string (Note: nothing after '=')
set Display ALL the environment variables
For Windows Bat File
xxxxxxxxxx
:: your build may be different
set msbuildPath="C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\"
call setx msbuild %msbuildPath%