hola: me tope con un codigo para lista los programas instalados en windows xp, mas este programa no me esta funcionando en windows vista, me interesa mucho que funcione.
Les pongo el codigo aqui
Código Delphi
[-]
procedure TForm1.Button1Click(Sender: TObject);
const CLAVE =
'\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall';
var
reg : TRegistry;
Lista : TStringList;
Lista2 : TStringList;
i,n : integer;
begin
mp.Clear;
txtpcerrar.Clear;
reg := TRegistry.Create;
Lista := TStringList.Create;
Lista2 := TStringList.Create;
with Reg do
begin
RootKey := HKEY_LOCAL_MACHINE;
OpenKey(CLAVE,false);
GetKeyNames(Lista);
end;
for i := 0 to Lista.Count -1 do
begin
reg.OpenKey(CLAVE + '\' +Lista.Strings[i],false);
reg.GetValueNames(Lista2);
n:=Lista2.IndexOf('DisplayName');
if (n <> -1) and (Lista2.IndexOf('UninstallString')<>-1) then
begin
Mp.Lines.Append (reg.ReadString(Lista2.Strings[n])+' -
'+ reg.ReadString(Lista2.Strings Lista2.IndexOf('UninstallString')]));
end;
end;
Lista.Free;
Lista2.Free;
reg.CloseKey;
reg.Destroy;
end;