var
registry:TRegistry;
const RegPath='SOFTWARE\AVPress';//路径
begin
Registry:=TRegistry.create;
with Registry do //写注册表信息
begin
rootkey:=HKEY_LOCAL_MACHINE; //根目录
openkey(regpath,true);
writestring('FTPServerIP',CenterIP);
writestring('FtpPort',CenterPort);
writestring('HttpPort',CenterHttpPort);
closekey;
free;
end;
end;
还可以这样:
AppKey :='SOFTWARE\CLASSES\'+ExtractFileName(Application.ExeName)+'\OCRparameter';
if not Reg.OpenKey(AppKey,True) then
begin
raise Exception.Create(Format('ボキィエエスィ "%s"シ・。',[AppKey]));
end
其他的和上面的一样。。