开机启动函数
//开机启动函数
function FirstRunSystem(bool: Boolean):Boolean;
var
Reg : TRegistry;
begin
Reg := TRegistry.Create;
Reg.RootKey := HKEY_LOCAL_MACHINE;
try
Reg.OpenKey('\Software\Microsoft\Windows\CurrentVersion\Run',False);
if bool then
Reg.WriteString(Application.Title,Application.ExeName)
else
Reg.DeleteValue(Application.Title);
finally
Reg.CloseKey;
Reg.Free;
end;
end;