Luacom pluginini aktif et.
function WMIDateStringToDate(dtmDate)
if dtmDate then
dtmDate = tostring(dtmDate);
return (String.Mid (dtmDate, 7, 2) .. "/" ..
String.Mid (dtmDate, 5, 2) .. "/" ..
String.Left(dtmDate, 4) .. " " ..
String.Mid (dtmDate, 9, 2) .. ":" ..
String.Mid (dtmDate, 11, 2) .. ":" ..
String.Mid (dtmDate, 13, 2)
);
else
return "";
end
end
function Escape(v)
if (v == nil) then return ""; end
if (type(v) == "table") then return Table.Concat(v, ", "); end
if (type(v) == "boolean") then
if (v == true) then return "Yes"; else return "No"; end
end
return v;
end
TreeList.ClearColumns("Plugin1");
TreeList.ClearRows("Plugin1");
result = TreeList.AddColumn("Plugin1", "Caption", 100);
result = TreeList.AddColumn("Plugin1", "Description", 100);
result = TreeList.AddColumn("Plugin1", "HotFixID", 100);
result = TreeList.AddColumn("Plugin1", "InstallDate", 100);
result = TreeList.AddColumn("Plugin1", "Status", 100);
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n==========================================\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CIMV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_QuickFixEngineering", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
result = TreeList.AddRow("Plugin1",Escape(oItem:Caption()) .. "|" ..Escape(oItem:Description()).."|"..
Escape(oItem:HotFixID()).. "|" .. Escape(oItem:InstalledOn()) .."|"..
Escape(oItem:Status()), nil, nil, nil);
oItem = oEnum:Next();
end
else
Dialog.Message("Error", "Update ler alınamadı");
end
Güncellemeleri çekmek istediğin butona yaz.
Ben treelist e ekledim.