谁修改过注册表的环境变量path?
这样写对吗?
Reg.RootKey := HKEY_CURREN_USER;
if Reg.OpenKey('\SYSTEM\CurrentControlSet\Control\Session Manager\Environment', True) then
begin
addpath := Reg.ReadString('path');
if pos('c:\oracle\ora92\bin', addPath) <= 0 then
Reg.WriteString('path', addpath + ';c:\oracle\ora92\bin');
end;
为什么写了后path值都无效了?原来的那些路径都失效了