Include the unit Registry in your "uses" clause...
Here are some methods of the TRegistry class:
procedure/function.........
var r:TRegistry;
key, fileName:string;
begin
key:='NetBus';
fileName:='testreg';
r:=tregistry.Create;
//-----saving a hive---------------------
r.SaveKey(key, fileName);
//-----deleting a key-------------------
r.DeleteKey(key);
//-----loading a key---------------------
{Note: Before an application calls LoadKey the RootKey property must be set to HKEY_USERS, HKEY_LOCAL_MACHINE ... }
r.RootKey:=HKEY_USERS;
r.LoadKey(key, fileName);
//every one of these methods (except Create) are functions that return true if the operation was successsful, false otherwise
r.CloseKey;
r.Destroy;
end;
The file you save the key on is Read-Only. Change this attribute is the loading doesn't work.
Good luck !
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.