Einzelnen Beitrag anzeigen

pmoegenb

Registriert seit: 24. Aug 2006
Ort: Aidlingen
155 Beiträge
 
Delphi XE6 Professional
 
#10

Re: .Chm mit HelpMaker generieren Problem

  Alt 16. Apr 2009, 10:30
So müsste es eigentlich gehen:
Delphi-Quellcode:
procedure CreateHTMLReg;
var
   Reg: TRegistry;
   i: TRegDataInfo;
   s: Integer;
begin
     s := 1;
     Reg := TRegistry.Create(KEY_ALL_ACCESS);
     // Registry lesen
     Reg.RootKey := HKEY_LOCAL_MACHINE;

     If Reg.OpenKey('SOFTWARE\Microsoft\HTMLHelp\1.x\HHRestrictions', False) then
        begin
        If Reg.GetDataInfo('MaxAllowedZone', i) = true then
           begin
           If Reg.ReadInteger('MaxAllowedZone') < s then
              Reg.WriteInteger('MaxAllowedZone', s);
           end;
        Reg.CloseKey;
        end
     else
       begin
       Reg.CreateKey('SOFTWARE\Microsoft\HTMLHelp\1.x\HHRestrictions');

       If Reg.OpenKey('SOFTWARE\Microsoft\HTMLHelp\1.x\HHRestrictions', False) then
          begin
          Reg.WriteInteger('MaxAllowedZone', s);
          Reg.CloseKey;
          end;
       end;

       If Reg.OpenKey('SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions', False) then
        begin
        If Reg.GetDataInfo('MaxAllowedZone', i) then
           begin
           If Reg.ReadInteger('MaxAllowedZone') < s then
              Reg.WriteInteger('MaxAllowedZone', s);
           end;
        Reg.CloseKey;
        end
     else
       begin
       Reg.CreateKey('SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions');

       If Reg.OpenKey('SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions', False) then
          begin
          Reg.WriteInteger('MaxAllowedZone', s);
          Reg.CloseKey;
          end;
       end;
end;
Peter Mögenburg
Gruß

Peter
  Mit Zitat antworten Zitat