WMIC设置环境变量

WMIC设置Windbg环境变量——_NT_SYMBOL_PATH
2011-04-21 19:53

wmic创建或修改的系统变量不用重启windows生效,也不用重启explorer.exe

不过系统都没默认安装,要在cmd中输入wmic, 安装好了就行


::获取temp环境变量
wmic ENVIRONMENT where "name='_NT_SYMBOL_PATH'" get UserName,VariableValue
::更改path环境变量值,新增当前目录%~dp0

::wmic ENVIRONMENT where "name='_NT_SYMBOL_PATH' and username=''" set VariableValue="%_NT_SYMBOL_PATH%;%~dp0"
::新增系统环境变量_NT_SYMBOL_PATH,值为当前目录%~dp0

::可以在符号目录文件下建一个bat,用下面这一句就行了

wmic ENVIRONMENT create name="_NT_SYMBOL_PATH",username="",VariableValue=%~dp0
::删除_NT_SYMBOL_PATH环境变量
::wmic ENVIRONMENT where "name='_NT_SYMBOL_PATH'" delete


转载于:https://www.cnblogs.com/kevinzhwl/archive/2011/09/02/3878862.html

你可能感兴趣的:(WMIC设置环境变量)