作者GodIsland (搞不定吗用C4就对了)
看板EzHotKey
标题[-AI-]增加环境变数中系统变数的Path路径
时间Thu Jan 22 09:41:08 2015
http://www.autoitscript.com/forum/topic/117633-how-to-add-to-path-environment
-variable-with-autoit/
官方论坛有,主要是做纪录方便同好查询
$key = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment"
$val = "PATH"
$PATH = RegRead($key, $val)
$sAddThisPath = "C:\my new path\"
$PATH = $PATH & ";" & $sAddThisPath
RegWrite($key,$val,"REG_EXPAND_SZ",$PATH)
EnvUpdate()
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 211.20.112.13
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/EzHotKey/M.1421890871.A.0E4.html