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='<system>'" set VariableValue="%_NT_SYMBOL_PATH%;%~dp0"
::新增系统环境变量_NT_SYMBOL_PATH,值为当前目录%~dp0

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

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


posted @ 2011-09-02 09:41  kevinzhwl  阅读(554)  评论(0编辑  收藏  举报