linux的环境变量很容易就修改了 这里重点讲下windows的 * 临时生效:set TEST="E:\" 仅在当前cmd窗口生效,不会更改系统内的 * 删除环境变量TEST ~~~ @Echo Off Reg Delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v "TEST" /f 2>nul Reg Delete "HKEY_CURRENT_USER\Environment" /v "TEST" /f 2>nul Pause ~~~