السلام عليكم ورحمة الله وبركاته
قبل الرجوع لآخر إنشغال .... أحببت أن أقرأ لأخ كريم أكواد أعجبتني شعرت أنه لم يطلع عليها متعلقة بمنصة الوينداوز
و الوصول إلى بعض التفاصيل الدقيقــة في الجهاز قبل ذلك تفعيل الاضافة LuaCom ضروري
لعمل الأكواد
ملاحظة : بعض القيم المتغيرة اذ أريد توظيفها من الاحسن تستدعى من خلال الحدث on timer
قرأت لك اليوم قد تحتاجها :
الأكواد المتعلقة بــ : DataFile
- الأكواد المتعلقة بــ DirectoryContainsFile
[html]
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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM CIM_DirectoryContainsFile", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "GroupComponent: " .. Escape(oItem:GroupComponent()) .. "\r\n";
sOutput = sOutput .. "PartComponent: " .. Escape(oItem:PartComponent()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: CIM_DirectoryContainsFile");
end[/html]
الأكواد المتعلقة بــ ProcessExecutable
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM CIM_ProcessExecutable", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Antecedent: " .. Escape(oItem:Antecedent()) .. "\r\n";
sOutput = sOutput .. "BaseAddress: " .. Escape(oItem:BaseAddress()) .. "\r\n";
sOutput = sOutput .. "Dependent: " .. Escape(oItem:Dependent()) .. "\r\n";
sOutput = sOutput .. "GlobalProcessCount: " .. Escape(oItem:GlobalProcessCount()) .. "\r\n";
sOutput = sOutput .. "ModuleInstance: " .. Escape(oItem:ModuleInstance()) .. "\r\n";
sOutput = sOutput .. "ProcessCount: " .. Escape(oItem:ProcessCount()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: CIM_ProcessExecutable");
end[/html]
الأكواد المتعلقة بــ VideoControllerResolution
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM CIM_VideoControllerResolution", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Caption: " .. Escape(oItem:Caption()) .. "\r\n";
sOutput = sOutput .. "Description: " .. Escape(oItem:Description()) .. "\r\n";
sOutput = sOutput .. "HorizontalResolution: " .. Escape(oItem:HorizontalResolution()) .. "\r\n";
sOutput = sOutput .. "MaxRefreshRate: " .. Escape(oItem:MaxRefreshRate()) .. "\r\n";
sOutput = sOutput .. "MinRefreshRate: " .. Escape(oItem:MinRefreshRate()) .. "\r\n";
sOutput = sOutput .. "NumberOfColors: " .. Escape(oItem:NumberOfColors()) .. "\r\n";
sOutput = sOutput .. "RefreshRate: " .. Escape(oItem:RefreshRate()) .. "\r\n";
sOutput = sOutput .. "ScanMode: " .. Escape(oItem:ScanMode()) .. "\r\n";
sOutput = sOutput .. "SettingID: " .. Escape(oItem:SettingID()) .. "\r\n";
sOutput = sOutput .. "VerticalResolution: " .. Escape(oItem:VerticalResolution()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: CIM_VideoControllerResolution");
end[/html]
الأكواد المتعلقة بــ Providers
[html]
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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Msft_Providers", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "HostingGroup: " .. Escape(oItem:HostingGroup()) .. "\r\n";
sOutput = sOutput .. "HostingSpecification: " .. Escape(oItem:HostingSpecification()) .. "\r\n";
sOutput = sOutput .. "HostProcessIdentifier: " .. Escape(oItem:HostProcessIdentifier()) .. "\r\n";
sOutput = sOutput .. "Locale: " .. Escape(oItem:Locale()) .. "\r\n";
sOutput = sOutput .. "Namespace: " .. Escape(oItem:Namespace()) .. "\r\n";
sOutput = sOutput .. "provider: " .. Escape(oItem:provider()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_AccessCheck: " .. Escape(oItem:ProviderOperation_AccessCheck()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CancelQuery: " .. Escape(oItem:ProviderOperation_CancelQuery()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateClassEnumAsync: " .. Escape(oItem:ProviderOperation_CreateClassEnumAsyn c()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateInstanceEnumAsync: " .. Escape(oItem:ProviderOperation_CreateInstanceEnumA sync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateRefreshableEnum: " .. Escape(oItem:ProviderOperation_CreateRefreshableEn um()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateRefreshableObject: " .. Escape(oItem:ProviderOperation_CreateRefreshableOb ject()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateRefresher: " .. Escape(oItem:ProviderOperation_CreateRefresher()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_DeleteClassAsync: " .. Escape(oItem:ProviderOperation_DeleteClassAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_DeleteInstanceAsync: " .. Escape(oItem:ProviderOperation_DeleteInstanceAsync ()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_ExecMethodAsync: " .. Escape(oItem:ProviderOperation_ExecMethodAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_ExecQueryAsync: " .. Escape(oItem:ProviderOperation_ExecQueryAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_FindConsumer: " .. Escape(oItem:ProviderOperation_FindConsumer()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_GetObjectAsync: " .. Escape(oItem:ProviderOperation_GetObjectAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_GetObjects: " .. Escape(oItem:ProviderOperation_GetObjects()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_GetProperty: " .. Escape(oItem:ProviderOperation_GetProperty()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_NewQuery: " .. Escape(oItem:ProviderOperation_NewQuery()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_ProvideEvents: " .. Escape(oItem:ProviderOperation_ProvideEvents()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_PutClassAsync: " .. Escape(oItem:ProviderOperation_PutClassAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_PutInstanceAsync: " .. Escape(oItem:ProviderOperation_PutInstanceAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_PutProperty: " .. Escape(oItem:ProviderOperation_PutProperty()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_QueryInstances: " .. Escape(oItem:ProviderOperation_QueryInstances()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_SetRegistrationObject: " .. Escape(oItem:ProviderOperation_SetRegistrationObje ct()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_StopRefreshing: " .. Escape(oItem:ProviderOperation_StopRefreshing()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_ValidateSubscription: " .. Escape(oItem:ProviderOperation_ValidateSubscriptio n()) .. "\r\n";
sOutput = sOutput .. "TransactionIdentifier: " .. Escape(oItem:TransactionIdentifier()) .. "\r\n";
sOutput = sOutput .. "User: " .. Escape(oItem:User()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Msft_Providers");
end[/html]
الأكواد المتعلقة بــ Provider Counters
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Msft_WmiProvider_Counters", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "ProviderOperation_AccessCheck: " .. Escape(oItem:ProviderOperation_AccessCheck()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CancelQuery: " .. Escape(oItem:ProviderOperation_CancelQuery()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateClassEnumAsync: " .. Escape(oItem:ProviderOperation_CreateClassEnumAsyn c()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateInstanceEnumAsync: " .. Escape(oItem:ProviderOperation_CreateInstanceEnumA sync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateRefreshableEnum: " .. Escape(oItem:ProviderOperation_CreateRefreshableEn um()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateRefreshableObject: " .. Escape(oItem:ProviderOperation_CreateRefreshableOb ject()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateRefresher: " .. Escape(oItem:ProviderOperation_CreateRefresher()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_DeleteClassAsync: " .. Escape(oItem:ProviderOperation_DeleteClassAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_DeleteInstanceAsync: " .. Escape(oItem:ProviderOperation_DeleteInstanceAsync ()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_ExecMethodAsync: " .. Escape(oItem:ProviderOperation_ExecMethodAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_ExecQueryAsync: " .. Escape(oItem:ProviderOperation_ExecQueryAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_FindConsumer: " .. Escape(oItem:ProviderOperation_FindConsumer()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_GetObjectAsync: " .. Escape(oItem:ProviderOperation_GetObjectAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_GetObjects: " .. Escape(oItem:ProviderOperation_GetObjects()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_GetProperty: " .. Escape(oItem:ProviderOperation_GetProperty()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_NewQuery: " .. Escape(oItem:ProviderOperation_NewQuery()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_ProvideEvents: " .. Escape(oItem:ProviderOperation_ProvideEvents()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_PutClassAsync: " .. Escape(oItem:ProviderOperation_PutClassAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_PutInstanceAsync: " .. Escape(oItem:ProviderOperation_PutInstanceAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_PutProperty: " .. Escape(oItem:ProviderOperation_PutProperty()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_QueryInstances: " .. Escape(oItem:ProviderOperation_QueryInstances()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_SetRegistrationObject: " .. Escape(oItem:ProviderOperation_SetRegistrationObje ct()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_StopRefreshing: " .. Escape(oItem:ProviderOperation_StopRefreshing()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_ValidateSubscription: " .. Escape(oItem:ProviderOperation_ValidateSubscriptio n()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Msft_WmiProvider_Counters");
end[/html]
الأكواد المتعلقة بــ NetDiagnostics
[html]
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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM NetDiagnostics", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "bIEProxy: " .. Escape(oItem:bIEProxy()) .. "\r\n";
sOutput = sOutput .. "id: " .. Escape(oItem:id()) .. "\r\n";
sOutput = sOutput .. "IEProxy: " .. Escape(oItem:IEProxy()) .. "\r\n";
sOutput = sOutput .. "IEProxyPort: " .. Escape(oItem:IEProxyPort()) .. "\r\n";
sOutput = sOutput .. "NewsNNTPPort: " .. Escape(oItem:NewsNNTPPort()) .. "\r\n";
sOutput = sOutput .. "NewsServer: " .. Escape(oItem:NewsServer()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: NetDiagnostics");
end[/html]
الأكواد المتعلقة بــ AccountSID
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_AccountSID", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Element: " .. Escape(oItem:Element()) .. "\r\n";
sOutput = sOutput .. "Setting: " .. Escape(oItem:Setting()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_AccountSID");
end[/html]
الأكواد المتعلقة بــ ActionCheck
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_ActionCheck", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Action: " .. Escape(oItem:Action()) .. "\r\n";
sOutput = sOutput .. "Check: " .. Escape(oItem:Check()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_ActionCheck");
end[/html]
الأكواد المتعلقة بــ AllocatedResource
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_AllocatedResource", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Antecedent: " .. Escape(oItem:Antecedent()) .. "\r\n";
sOutput = sOutput .. "Dependent: " .. Escape(oItem:Dependent()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_AllocatedResource");
end[/html]
الأكواد المتعلقة بـــ Win32_ApplicationCommandLine
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_ApplicationCommandLine", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Antecedent: " .. Escape(oItem:Antecedent()) .. "\r\n";
sOutput = sOutput .. "Dependent: " .. Escape(oItem:Dependent()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_ApplicationCommandLine");
end[/html]
الأكواد المتعلقة بــ ApplicationService
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_ApplicationService", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Caption: " .. Escape(oItem:Caption()) .. "\r\n";
sOutput = sOutput .. "CreationClassName: " .. Escape(oItem:CreationClassName()) .. "\r\n";
sOutput = sOutput .. "Description: " .. Escape(oItem:Description()) .. "\r\n";
sOutput = sOutput .. "InstallDate: " .. WMIDateStringToDate(oItem:InstallDate()) .. "\r\n";
sOutput = sOutput .. "Name: " .. Escape(oItem:Name()) .. "\r\n";
sOutput = sOutput .. "Started: " .. Escape(oItem:Started()) .. "\r\n";
sOutput = sOutput .. "StartMode: " .. Escape(oItem:StartMode()) .. "\r\n";
sOutput = sOutput .. "Status: " .. Escape(oItem:Status()) .. "\r\n";
sOutput = sOutput .. "SystemCreationClassName: " .. Escape(oItem:SystemCreationClassName()) .. "\r\n";
sOutput = sOutput .. "SystemName: " .. Escape(oItem:SystemName()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_ApplicationService");
end[/html]
الأكواد المتعلقة بــ AssociatedProcessorMemory
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_AssociatedProcessorMemory", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Antecedent: " .. Escape(oItem:Antecedent()) .. "\r\n";
sOutput = sOutput .. "BusSpeed: " .. Escape(oItem:BusSpeed()) .. "\r\n";
sOutput = sOutput .. "Dependent: " .. Escape(oItem:Dependent()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_AssociatedProcessorMemory");
end[/html]
الأكواد المتعلقة بــ AutochkSetting
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_AutochkSetting", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Caption: " .. Escape(oItem:Caption()) .. "\r\n";
sOutput = sOutput .. "Description: " .. Escape(oItem:Description()) .. "\r\n";
sOutput = sOutput .. "SettingID: " .. Escape(oItem:SettingID()) .. "\r\n";
sOutput = sOutput .. "UserInputDelay: " .. Escape(oItem:UserInputDelay()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_AutochkSetting");
end[/html]
الأكواد المتعلقة بــ BaseBoard
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_BaseBoard", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Caption: " .. Escape(oItem:Caption()) .. "\r\n";
sOutput = sOutput .. "ConfigOptions: " .. Escape(oItem:ConfigOptions()) .. "\r\n";
sOutput = sOutput .. "CreationClassName: " .. Escape(oItem:CreationClassName()) .. "\r\n";
sOutput = sOutput .. "Depth: " .. Escape(oItem:Depth()) .. "\r\n";
sOutput = sOutput .. "Description: " .. Escape(oItem:Description()) .. "\r\n";
sOutput = sOutput .. "Height: " .. Escape(oItem:Height()) .. "\r\n";
sOutput = sOutput .. "HostingBoard: " .. Escape(oItem:HostingBoard()) .. "\r\n";
sOutput = sOutput .. "HotSwappable: " .. Escape(oItem:HotSwappable()) .. "\r\n";
sOutput = sOutput .. "InstallDate: " .. WMIDateStringToDate(oItem:InstallDate()) .. "\r\n";
sOutput = sOutput .. "Manufacturer: " .. Escape(oItem:Manufacturer()) .. "\r\n";
sOutput = sOutput .. "Model: " .. Escape(oItem:Model()) .. "\r\n";
sOutput = sOutput .. "Name: " .. Escape(oItem:Name()) .. "\r\n";
sOutput = sOutput .. "OtherIdentifyingInfo: " .. Escape(oItem:OtherIdentifyingInfo()) .. "\r\n";
sOutput = sOutput .. "PartNumber: " .. Escape(oItem:PartNumber()) .. "\r\n";
sOutput = sOutput .. "PoweredOn: " .. Escape(oItem:PoweredOn()) .. "\r\n";
sOutput = sOutput .. "Product: " .. Escape(oItem:Product()) .. "\r\n";
sOutput = sOutput .. "Removable: " .. Escape(oItem:Removable()) .. "\r\n";
sOutput = sOutput .. "Replaceable: " .. Escape(oItem:Replaceable()) .. "\r\n";
sOutput = sOutput .. "RequirementsDescription: " .. Escape(oItem:RequirementsDescription()) .. "\r\n";
sOutput = sOutput .. "RequiresDaughterBoard: " .. Escape(oItem:RequiresDaughterBoard()) .. "\r\n";
sOutput = sOutput .. "SerialNumber: " .. Escape(oItem:SerialNumber()) .. "\r\n";
sOutput = sOutput .. "SKU: " .. Escape(oItem:SKU()) .. "\r\n";
sOutput = sOutput .. "SlotLayout: " .. Escape(oItem:SlotLayout()) .. "\r\n";
sOutput = sOutput .. "SpecialRequirements: " .. Escape(oItem:SpecialRequirements()) .. "\r\n";
sOutput = sOutput .. "Status: " .. Escape(oItem:Status()) .. "\r\n";
sOutput = sOutput .. "Tag: " .. Escape(oItem:Tag()) .. "\r\n";
sOutput = sOutput .. "Version: " .. Escape(oItem:Version()) .. "\r\n";
sOutput = sOutput .. "Weight: " .. Escape(oItem:Weight()) .. "\r\n";
sOutput = sOutput .. "Width: " .. Escape(oItem:Width()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_BaseBoard");
end[/html]
[hide]يتبع
[/hide]
قبل الرجوع لآخر إنشغال .... أحببت أن أقرأ لأخ كريم أكواد أعجبتني شعرت أنه لم يطلع عليها متعلقة بمنصة الوينداوز
و الوصول إلى بعض التفاصيل الدقيقــة في الجهاز قبل ذلك تفعيل الاضافة LuaCom ضروري
لعمل الأكواد
ملاحظة : بعض القيم المتغيرة اذ أريد توظيفها من الاحسن تستدعى من خلال الحدث on timer
قرأت لك اليوم قد تحتاجها :
الأكواد المتعلقة بــ : DataFile
كود PHP:
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
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 CIM_DataFile", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "AccessMask: " .. Escape(oItem:AccessMask()) .. "\r\n";
sOutput = sOutput .. "Archive: " .. Escape(oItem:Archive()) .. "\r\n";
sOutput = sOutput .. "Caption: " .. Escape(oItem:Caption()) .. "\r\n";
sOutput = sOutput .. "Compressed: " .. Escape(oItem:Compressed()) .. "\r\n";
sOutput = sOutput .. "CompressionMethod: " .. Escape(oItem:CompressionMethod()) .. "\r\n";
sOutput = sOutput .. "CreationClassName: " .. Escape(oItem:CreationClassName()) .. "\r\n";
sOutput = sOutput .. "CreationDate: " .. WMIDateStringToDate(oItem:CreationDate()) .. "\r\n";
sOutput = sOutput .. "CSCreationClassName: " .. Escape(oItem:CSCreationClassName()) .. "\r\n";
sOutput = sOutput .. "CSName: " .. Escape(oItem:CSName()) .. "\r\n";
sOutput = sOutput .. "Description: " .. Escape(oItem:Description()) .. "\r\n";
sOutput = sOutput .. "Drive: " .. Escape(oItem:Drive()) .. "\r\n";
sOutput = sOutput .. "EightDotThreeFileName: " .. Escape(oItem:EightDotThreeFileName()) .. "\r\n";
sOutput = sOutput .. "Encrypted: " .. Escape(oItem:Encrypted()) .. "\r\n";
sOutput = sOutput .. "EncryptionMethod: " .. Escape(oItem:EncryptionMethod()) .. "\r\n";
sOutput = sOutput .. "Extension: " .. Escape(oItem:Extension()) .. "\r\n";
sOutput = sOutput .. "FileName: " .. Escape(oItem:FileName()) .. "\r\n";
sOutput = sOutput .. "FileSize: " .. Escape(oItem:FileSize()) .. "\r\n";
sOutput = sOutput .. "FileType: " .. Escape(oItem:FileType()) .. "\r\n";
sOutput = sOutput .. "FSCreationClassName: " .. Escape(oItem:FSCreationClassName()) .. "\r\n";
sOutput = sOutput .. "FSName: " .. Escape(oItem:FSName()) .. "\r\n";
sOutput = sOutput .. "Hidden: " .. Escape(oItem:Hidden()) .. "\r\n";
sOutput = sOutput .. "InstallDate: " .. WMIDateStringToDate(oItem:InstallDate()) .. "\r\n";
sOutput = sOutput .. "InUseCount: " .. Escape(oItem:InUseCount()) .. "\r\n";
sOutput = sOutput .. "LastAccessed: " .. WMIDateStringToDate(oItem:LastAccessed()) .. "\r\n";
sOutput = sOutput .. "LastModified: " .. WMIDateStringToDate(oItem:LastModified()) .. "\r\n";
sOutput = sOutput .. "Manufacturer: " .. Escape(oItem:Manufacturer()) .. "\r\n";
sOutput = sOutput .. "Name: " .. Escape(oItem:Name()) .. "\r\n";
sOutput = sOutput .. "Path: " .. Escape(oItem:Path()) .. "\r\n";
sOutput = sOutput .. "Readable: " .. Escape(oItem:Readable()) .. "\r\n";
sOutput = sOutput .. "Status: " .. Escape(oItem:Status()) .. "\r\n";
sOutput = sOutput .. "System: " .. Escape(oItem:System()) .. "\r\n";
sOutput = sOutput .. "Version: " .. Escape(oItem:Version()) .. "\r\n";
sOutput = sOutput .. "Writeable: " .. Escape(oItem:Writeable()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: CIM_DataFile");
end
[html]
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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM CIM_DirectoryContainsFile", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "GroupComponent: " .. Escape(oItem:GroupComponent()) .. "\r\n";
sOutput = sOutput .. "PartComponent: " .. Escape(oItem:PartComponent()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: CIM_DirectoryContainsFile");
end[/html]
الأكواد المتعلقة بــ ProcessExecutable
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM CIM_ProcessExecutable", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Antecedent: " .. Escape(oItem:Antecedent()) .. "\r\n";
sOutput = sOutput .. "BaseAddress: " .. Escape(oItem:BaseAddress()) .. "\r\n";
sOutput = sOutput .. "Dependent: " .. Escape(oItem:Dependent()) .. "\r\n";
sOutput = sOutput .. "GlobalProcessCount: " .. Escape(oItem:GlobalProcessCount()) .. "\r\n";
sOutput = sOutput .. "ModuleInstance: " .. Escape(oItem:ModuleInstance()) .. "\r\n";
sOutput = sOutput .. "ProcessCount: " .. Escape(oItem:ProcessCount()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: CIM_ProcessExecutable");
end[/html]
الأكواد المتعلقة بــ VideoControllerResolution
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM CIM_VideoControllerResolution", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Caption: " .. Escape(oItem:Caption()) .. "\r\n";
sOutput = sOutput .. "Description: " .. Escape(oItem:Description()) .. "\r\n";
sOutput = sOutput .. "HorizontalResolution: " .. Escape(oItem:HorizontalResolution()) .. "\r\n";
sOutput = sOutput .. "MaxRefreshRate: " .. Escape(oItem:MaxRefreshRate()) .. "\r\n";
sOutput = sOutput .. "MinRefreshRate: " .. Escape(oItem:MinRefreshRate()) .. "\r\n";
sOutput = sOutput .. "NumberOfColors: " .. Escape(oItem:NumberOfColors()) .. "\r\n";
sOutput = sOutput .. "RefreshRate: " .. Escape(oItem:RefreshRate()) .. "\r\n";
sOutput = sOutput .. "ScanMode: " .. Escape(oItem:ScanMode()) .. "\r\n";
sOutput = sOutput .. "SettingID: " .. Escape(oItem:SettingID()) .. "\r\n";
sOutput = sOutput .. "VerticalResolution: " .. Escape(oItem:VerticalResolution()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: CIM_VideoControllerResolution");
end[/html]
الأكواد المتعلقة بــ Providers
[html]
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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Msft_Providers", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "HostingGroup: " .. Escape(oItem:HostingGroup()) .. "\r\n";
sOutput = sOutput .. "HostingSpecification: " .. Escape(oItem:HostingSpecification()) .. "\r\n";
sOutput = sOutput .. "HostProcessIdentifier: " .. Escape(oItem:HostProcessIdentifier()) .. "\r\n";
sOutput = sOutput .. "Locale: " .. Escape(oItem:Locale()) .. "\r\n";
sOutput = sOutput .. "Namespace: " .. Escape(oItem:Namespace()) .. "\r\n";
sOutput = sOutput .. "provider: " .. Escape(oItem:provider()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_AccessCheck: " .. Escape(oItem:ProviderOperation_AccessCheck()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CancelQuery: " .. Escape(oItem:ProviderOperation_CancelQuery()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateClassEnumAsync: " .. Escape(oItem:ProviderOperation_CreateClassEnumAsyn c()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateInstanceEnumAsync: " .. Escape(oItem:ProviderOperation_CreateInstanceEnumA sync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateRefreshableEnum: " .. Escape(oItem:ProviderOperation_CreateRefreshableEn um()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateRefreshableObject: " .. Escape(oItem:ProviderOperation_CreateRefreshableOb ject()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateRefresher: " .. Escape(oItem:ProviderOperation_CreateRefresher()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_DeleteClassAsync: " .. Escape(oItem:ProviderOperation_DeleteClassAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_DeleteInstanceAsync: " .. Escape(oItem:ProviderOperation_DeleteInstanceAsync ()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_ExecMethodAsync: " .. Escape(oItem:ProviderOperation_ExecMethodAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_ExecQueryAsync: " .. Escape(oItem:ProviderOperation_ExecQueryAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_FindConsumer: " .. Escape(oItem:ProviderOperation_FindConsumer()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_GetObjectAsync: " .. Escape(oItem:ProviderOperation_GetObjectAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_GetObjects: " .. Escape(oItem:ProviderOperation_GetObjects()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_GetProperty: " .. Escape(oItem:ProviderOperation_GetProperty()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_NewQuery: " .. Escape(oItem:ProviderOperation_NewQuery()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_ProvideEvents: " .. Escape(oItem:ProviderOperation_ProvideEvents()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_PutClassAsync: " .. Escape(oItem:ProviderOperation_PutClassAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_PutInstanceAsync: " .. Escape(oItem:ProviderOperation_PutInstanceAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_PutProperty: " .. Escape(oItem:ProviderOperation_PutProperty()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_QueryInstances: " .. Escape(oItem:ProviderOperation_QueryInstances()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_SetRegistrationObject: " .. Escape(oItem:ProviderOperation_SetRegistrationObje ct()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_StopRefreshing: " .. Escape(oItem:ProviderOperation_StopRefreshing()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_ValidateSubscription: " .. Escape(oItem:ProviderOperation_ValidateSubscriptio n()) .. "\r\n";
sOutput = sOutput .. "TransactionIdentifier: " .. Escape(oItem:TransactionIdentifier()) .. "\r\n";
sOutput = sOutput .. "User: " .. Escape(oItem:User()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Msft_Providers");
end[/html]
الأكواد المتعلقة بــ Provider Counters
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Msft_WmiProvider_Counters", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "ProviderOperation_AccessCheck: " .. Escape(oItem:ProviderOperation_AccessCheck()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CancelQuery: " .. Escape(oItem:ProviderOperation_CancelQuery()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateClassEnumAsync: " .. Escape(oItem:ProviderOperation_CreateClassEnumAsyn c()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateInstanceEnumAsync: " .. Escape(oItem:ProviderOperation_CreateInstanceEnumA sync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateRefreshableEnum: " .. Escape(oItem:ProviderOperation_CreateRefreshableEn um()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateRefreshableObject: " .. Escape(oItem:ProviderOperation_CreateRefreshableOb ject()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_CreateRefresher: " .. Escape(oItem:ProviderOperation_CreateRefresher()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_DeleteClassAsync: " .. Escape(oItem:ProviderOperation_DeleteClassAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_DeleteInstanceAsync: " .. Escape(oItem:ProviderOperation_DeleteInstanceAsync ()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_ExecMethodAsync: " .. Escape(oItem:ProviderOperation_ExecMethodAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_ExecQueryAsync: " .. Escape(oItem:ProviderOperation_ExecQueryAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_FindConsumer: " .. Escape(oItem:ProviderOperation_FindConsumer()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_GetObjectAsync: " .. Escape(oItem:ProviderOperation_GetObjectAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_GetObjects: " .. Escape(oItem:ProviderOperation_GetObjects()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_GetProperty: " .. Escape(oItem:ProviderOperation_GetProperty()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_NewQuery: " .. Escape(oItem:ProviderOperation_NewQuery()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_ProvideEvents: " .. Escape(oItem:ProviderOperation_ProvideEvents()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_PutClassAsync: " .. Escape(oItem:ProviderOperation_PutClassAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_PutInstanceAsync: " .. Escape(oItem:ProviderOperation_PutInstanceAsync()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_PutProperty: " .. Escape(oItem:ProviderOperation_PutProperty()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_QueryInstances: " .. Escape(oItem:ProviderOperation_QueryInstances()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_SetRegistrationObject: " .. Escape(oItem:ProviderOperation_SetRegistrationObje ct()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_StopRefreshing: " .. Escape(oItem:ProviderOperation_StopRefreshing()) .. "\r\n";
sOutput = sOutput .. "ProviderOperation_ValidateSubscription: " .. Escape(oItem:ProviderOperation_ValidateSubscriptio n()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Msft_WmiProvider_Counters");
end[/html]
الأكواد المتعلقة بــ NetDiagnostics
[html]
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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM NetDiagnostics", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "bIEProxy: " .. Escape(oItem:bIEProxy()) .. "\r\n";
sOutput = sOutput .. "id: " .. Escape(oItem:id()) .. "\r\n";
sOutput = sOutput .. "IEProxy: " .. Escape(oItem:IEProxy()) .. "\r\n";
sOutput = sOutput .. "IEProxyPort: " .. Escape(oItem:IEProxyPort()) .. "\r\n";
sOutput = sOutput .. "NewsNNTPPort: " .. Escape(oItem:NewsNNTPPort()) .. "\r\n";
sOutput = sOutput .. "NewsServer: " .. Escape(oItem:NewsServer()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: NetDiagnostics");
end[/html]
الأكواد المتعلقة بــ AccountSID
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_AccountSID", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Element: " .. Escape(oItem:Element()) .. "\r\n";
sOutput = sOutput .. "Setting: " .. Escape(oItem:Setting()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_AccountSID");
end[/html]
الأكواد المتعلقة بــ ActionCheck
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_ActionCheck", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Action: " .. Escape(oItem:Action()) .. "\r\n";
sOutput = sOutput .. "Check: " .. Escape(oItem:Check()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_ActionCheck");
end[/html]
الأكواد المتعلقة بــ AllocatedResource
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_AllocatedResource", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Antecedent: " .. Escape(oItem:Antecedent()) .. "\r\n";
sOutput = sOutput .. "Dependent: " .. Escape(oItem:Dependent()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_AllocatedResource");
end[/html]
الأكواد المتعلقة بـــ Win32_ApplicationCommandLine
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_ApplicationCommandLine", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Antecedent: " .. Escape(oItem:Antecedent()) .. "\r\n";
sOutput = sOutput .. "Dependent: " .. Escape(oItem:Dependent()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_ApplicationCommandLine");
end[/html]
الأكواد المتعلقة بــ ApplicationService
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_ApplicationService", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Caption: " .. Escape(oItem:Caption()) .. "\r\n";
sOutput = sOutput .. "CreationClassName: " .. Escape(oItem:CreationClassName()) .. "\r\n";
sOutput = sOutput .. "Description: " .. Escape(oItem:Description()) .. "\r\n";
sOutput = sOutput .. "InstallDate: " .. WMIDateStringToDate(oItem:InstallDate()) .. "\r\n";
sOutput = sOutput .. "Name: " .. Escape(oItem:Name()) .. "\r\n";
sOutput = sOutput .. "Started: " .. Escape(oItem:Started()) .. "\r\n";
sOutput = sOutput .. "StartMode: " .. Escape(oItem:StartMode()) .. "\r\n";
sOutput = sOutput .. "Status: " .. Escape(oItem:Status()) .. "\r\n";
sOutput = sOutput .. "SystemCreationClassName: " .. Escape(oItem:SystemCreationClassName()) .. "\r\n";
sOutput = sOutput .. "SystemName: " .. Escape(oItem:SystemName()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_ApplicationService");
end[/html]
الأكواد المتعلقة بــ AssociatedProcessorMemory
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_AssociatedProcessorMemory", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Antecedent: " .. Escape(oItem:Antecedent()) .. "\r\n";
sOutput = sOutput .. "BusSpeed: " .. Escape(oItem:BusSpeed()) .. "\r\n";
sOutput = sOutput .. "Dependent: " .. Escape(oItem:Dependent()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_AssociatedProcessorMemory");
end[/html]
الأكواد المتعلقة بــ AutochkSetting
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_AutochkSetting", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Caption: " .. Escape(oItem:Caption()) .. "\r\n";
sOutput = sOutput .. "Description: " .. Escape(oItem:Description()) .. "\r\n";
sOutput = sOutput .. "SettingID: " .. Escape(oItem:SettingID()) .. "\r\n";
sOutput = sOutput .. "UserInputDelay: " .. Escape(oItem:UserInputDelay()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_AutochkSetting");
end[/html]
الأكواد المتعلقة بــ BaseBoard
[html]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
local sOutput = "";
local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_BaseBoard", "WQL", 48);
if oColItems then
local oEnum = luacom.GetEnumerator(oColItems);
local oItem = oEnum:Next();
while oItem do
sOutput = sOutput .. "Caption: " .. Escape(oItem:Caption()) .. "\r\n";
sOutput = sOutput .. "ConfigOptions: " .. Escape(oItem:ConfigOptions()) .. "\r\n";
sOutput = sOutput .. "CreationClassName: " .. Escape(oItem:CreationClassName()) .. "\r\n";
sOutput = sOutput .. "Depth: " .. Escape(oItem:Depth()) .. "\r\n";
sOutput = sOutput .. "Description: " .. Escape(oItem:Description()) .. "\r\n";
sOutput = sOutput .. "Height: " .. Escape(oItem:Height()) .. "\r\n";
sOutput = sOutput .. "HostingBoard: " .. Escape(oItem:HostingBoard()) .. "\r\n";
sOutput = sOutput .. "HotSwappable: " .. Escape(oItem:HotSwappable()) .. "\r\n";
sOutput = sOutput .. "InstallDate: " .. WMIDateStringToDate(oItem:InstallDate()) .. "\r\n";
sOutput = sOutput .. "Manufacturer: " .. Escape(oItem:Manufacturer()) .. "\r\n";
sOutput = sOutput .. "Model: " .. Escape(oItem:Model()) .. "\r\n";
sOutput = sOutput .. "Name: " .. Escape(oItem:Name()) .. "\r\n";
sOutput = sOutput .. "OtherIdentifyingInfo: " .. Escape(oItem:OtherIdentifyingInfo()) .. "\r\n";
sOutput = sOutput .. "PartNumber: " .. Escape(oItem:PartNumber()) .. "\r\n";
sOutput = sOutput .. "PoweredOn: " .. Escape(oItem:PoweredOn()) .. "\r\n";
sOutput = sOutput .. "Product: " .. Escape(oItem:Product()) .. "\r\n";
sOutput = sOutput .. "Removable: " .. Escape(oItem:Removable()) .. "\r\n";
sOutput = sOutput .. "Replaceable: " .. Escape(oItem:Replaceable()) .. "\r\n";
sOutput = sOutput .. "RequirementsDescription: " .. Escape(oItem:RequirementsDescription()) .. "\r\n";
sOutput = sOutput .. "RequiresDaughterBoard: " .. Escape(oItem:RequiresDaughterBoard()) .. "\r\n";
sOutput = sOutput .. "SerialNumber: " .. Escape(oItem:SerialNumber()) .. "\r\n";
sOutput = sOutput .. "SKU: " .. Escape(oItem:SKU()) .. "\r\n";
sOutput = sOutput .. "SlotLayout: " .. Escape(oItem:SlotLayout()) .. "\r\n";
sOutput = sOutput .. "SpecialRequirements: " .. Escape(oItem:SpecialRequirements()) .. "\r\n";
sOutput = sOutput .. "Status: " .. Escape(oItem:Status()) .. "\r\n";
sOutput = sOutput .. "Tag: " .. Escape(oItem:Tag()) .. "\r\n";
sOutput = sOutput .. "Version: " .. Escape(oItem:Version()) .. "\r\n";
sOutput = sOutput .. "Weight: " .. Escape(oItem:Weight()) .. "\r\n";
sOutput = sOutput .. "Width: " .. Escape(oItem:Width()) .. "\r\n";
if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
sOutput = "";
oItem = oEnum:Next();
end
else
Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_BaseBoard");
end[/html]
[hide]يتبع

تعليق