作者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/m.aspx?n=bbs/EzHotKey/M.1421890871.A.0E4.html