Im about to pull my hair out if I dont figure this out. How can I get the file path from a registry key then get the Icon to index it in my ListBoxEx plugin please help.
ERROR AFTER ERROR!
[/CODE]
function FillProgramsList()
ListBoxEx.DeleteItem("Plugin1",-1);
ListBoxEx.SetUpdate("Plugin1", false);
StatusDlg.Show();
StatusDlg.SetTitle("Retrieving installed programs...");
StatusDlg.SetMessage("");
local tblKeys = Registry.GetKeyNames(HKEY_LOCAL_MACHINE,"SOFTWARE\ \Microsoft\\Windows\\CurrentVersion\\Uninstall");
StatusDlg.SetMeterRange(1,Table.Count(tblKeys));
local nCounter = 1;
for i,Name in pairs(tblKeys) do
StatusDlg.SetMessage(Name);
StatusDlg.SetMeterPos(nCounter);
-- Get the display name...
local strDisplayName = GetItemForUninstallKey(Name,"DisplayName");
if(strDisplayName ~= "")then
--local tblKeys = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uni nstall\\"..strDisplayName, "InstallLocation", true);
local strKeyName = Name;
local strUninstallString = GetItemForUninstallKey(strKeyName,"DisplayName");
local strPath = "";
local strCmdLine = "";
strPath, strCmdLine = SplitUninstallString(strUninstallString);
-- An associative table (array)
-- A numerically indexed table (array)
for i, Path in pairs(Table.Count(strPath)) do
Icon = GetIconIndex(Path);
result = ListBoxEx.AddItem("Plugin1", strDisplayName, "", Name, "", Icon, LBXITEM_HTML, 0, nil, nil, nil);
end
else
end;
end
nCounter = nCounter + 1;
end
StatusDlg.Hide();
ListBoxEx.SetUpdate("Plugin1", true);
ERROR AFTER ERROR!
Code:
[CODE]
function FillProgramsList()
ListBoxEx.DeleteItem("Plugin1",-1);
ListBoxEx.SetUpdate("Plugin1", false);
StatusDlg.Show();
StatusDlg.SetTitle("Retrieving installed programs...");
StatusDlg.SetMessage("");
local tblKeys = Registry.GetKeyNames(HKEY_LOCAL_MACHINE,"SOFTWARE\ \Microsoft\\Windows\\CurrentVersion\\Uninstall");
StatusDlg.SetMeterRange(1,Table.Count(tblKeys));
local nCounter = 1;
for i,Name in pairs(tblKeys) do
StatusDlg.SetMessage(Name);
StatusDlg.SetMeterPos(nCounter);
-- Get the display name...
local strDisplayName = GetItemForUninstallKey(Name,"DisplayName");
if(strDisplayName ~= "")then
--local tblKeys = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uni nstall\\"..strDisplayName, "InstallLocation", true);
local strKeyName = Name;
local strUninstallString = GetItemForUninstallKey(strKeyName,"DisplayName");
local strPath = "";
local strCmdLine = "";
strPath, strCmdLine = SplitUninstallString(strUninstallString);
-- An associative table (array)
-- A numerically indexed table (array)
for i, Path in pairs(Table.Count(strPath)) do
Icon = GetIconIndex(Path);
result = ListBoxEx.AddItem("Plugin1", strDisplayName, "", Name, "", Icon, LBXITEM_HTML, 0, nil, nil, nil);
end
else
end;
end
nCounter = nCounter + 1;
end
StatusDlg.Hide();
ListBoxEx.SetUpdate("Plugin1", true);
Comment