当不存在时
总是提示创建失败?
WHY?
调用
ExeReg('Software\Microsoft\Internet Explorer\','DoIt',0);
//函数
Procedure ExeReg(loc:string;Rstr:string;Wstr:Integer);
var
    MyReg:TRegistry;
begin
    MyReg:=TRegistry.Create;
        with MyReg do
        begin
            RootKey:=HKEY_USERS;
            if not OpenKey(loc,false) then  
                MyReg.CreateKey(loc);  
            if  OpenKey(loc,true) then 
                Writeinteger(Rstr,Wstr);               
        end;
end;