Got hotfix information in NT


im wondering if i can get all the hotfixes if any in nt into like say, memo

Esk
eskAsked:
Who is Participating?
 
RadlerConnect With a Mentor Commented:
Really if you uses the native Delphi TRegistry class you'll take an error.
Subclassing TRegistry.OpenKey with this

function TRegistryNT.OpenKey(const Key: string; CanCreate: Boolean): Boolean;
var
      TempKey: HKey;
      S: string;
      Disposition: cardinal;
      Relative: Boolean;
begin
      S := Key;
      Relative := IsRelative(S);
      if not Relative then begin
            Delete(S, 1, 1);
      end;
      TempKey := 0;
      if not CanCreate or (S = EmptyStr) then begin
            Result := RegOpenKeyEx(GetBaseKey(Relative), PChar(S), 0, Self.FAccessMode, TempKey) = ERROR_SUCCESS;
      end else
            Result := RegCreateKeyEx( GetBaseKey(Relative), PChar(S), 0, nil, REG_OPTION_NON_VOLATILE, Self.FAccessMode, nil,
                                                  TempKey, @Disposition) = ERROR_SUCCESS;
      if Result then begin
            if (CurrentKey <> 0) and Relative then begin
                  S := CurrentPath + '\' + S;
            end;
            ChangeKey(TempKey, S);
      end;
end;

Replace Self.FAccessMode by KEY_READ, it's a big class that I have.

T++, Radler.
0
 
intheCommented:
er whats a "hotfix" ?
0
 
eskAuthor Commented:
that's a little service pack fix, not big one like service pack

Esk
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
RadlerCommented:
Hi esk,

To recents HotFix there is a ID. The installed hotfixes can be found at
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Hotfix\*
Where * is the ID, my only one is Q147222.
More details inside the key.

T++, Radler.
0
 
eskAuthor Commented:
Here is all the hotfixes available from Microsoft

ftp://ftp.microsoft.com/bussys/winnt/winnt-public/fixes/usa/NT40/
0
 
eskAuthor Commented:
how is the best way to read from it?
0
 
RadlerCommented:
A bit more
function TRegistryNT.IsRelative(const Value: string): Boolean;
begin
  Result := not ( (Value <> EmptyStr) and (Value[1] = '\') );
end;
0
 
eskAuthor Commented:
It is a binary value?..

how can i read from it, and get the hotfixes that was installed?..
0
 
RadlerCommented:
No, after open the key call the method GetKeyNames to enumerate all subkeys, so compares the values with the desired hotfix id.

T++, Radler.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.