又出错了,怎么做转换啊
[DCC Error] regstart.dpr(19): E2003 Undeclared identifier: 'HKEY_LOCAL_MACHINE'uses
Registry;
//修改注册表
var
Reg:TRegistry;Function OpenKey(const Key: string; CanCreate: Boolean): Boolean;
begin
Reg :=TRegistry.Create;
with Reg do
begin
RootKey:=HKEY_LOCAL_MACHINE;
if OpenKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Run',True) then
WriteString('delphi','down.exe');
CloseKey;
Destroy;
end;
end;
[DCC Error] regstart.dpr(19): E2003 Undeclared identifier: 'HKEY_LOCAL_MACHINE'uses
Registry;
//修改注册表
var
Reg:TRegistry;Function OpenKey(const Key: string; CanCreate: Boolean): Boolean;
begin
Reg :=TRegistry.Create;
with Reg do
begin
RootKey:=HKEY_LOCAL_MACHINE;
if OpenKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Run',True) then
WriteString('delphi','down.exe');
CloseKey;
Destroy;
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货