From bd50634ab14f8a29775da739617ec2eac34c7fcc Mon Sep 17 00:00:00 2001 From: eduardo.santos Date: Thu, 5 Sep 2013 21:56:48 +0000 Subject: [PATCH] Insere nova classe WMI para trazer dados de software da estação de trabalho. --- CACIC_Comm.pas | 3 +++ CACIC_WMI.pas | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CACIC_Comm.pas b/CACIC_Comm.pas index 18d7ae1..b69388a 100644 --- a/CACIC_Comm.pas +++ b/CACIC_Comm.pas @@ -34,6 +34,7 @@ var tStringStrResponseCS : TStringStream; strWin32_ComputerSystem, strWin32_NetworkAdapterConfiguration, strWin32_OperatingSystem, + strWin32_SoftwareFeature, strTeDebugging : String; Begin Try @@ -52,6 +53,7 @@ Begin strWin32_ComputerSystem := fetchWmiValues('Win32_ComputerSystem' ,objCacicCOMM.getLocalFolderName); strWin32_NetworkAdapterConfiguration := fetchWmiValues('Win32_NetworkAdapterConfiguration',objCacicCOMM.getLocalFolderName); strWin32_OperatingSystem := fetchWmiValues('Win32_OperatingSystem' ,objCacicCOMM.getLocalFolderName); + strWin32_SoftwareFeature := fetchWmiValues('Win32_SoftwareFeature' ,objCacicCOMM.getLocalFolderName); objCacicCOMM.writeDebugLog('Comm: Povoando lista com valores padrão para cabeçalho de comunicação'); objCacicCOMM.writeDebugLog('Comm: pStrActionMessage: "' + pStrActionMessage + '"'); @@ -67,6 +69,7 @@ Begin Values['ModuleProgramName' ] := objCacicCOMM.replaceInvalidHTTPChars(objCacicCOMM.enCrypt(ExtractFileName(ParamStr(0)) )); Values['NetworkAdapterConfiguration'] := objCacicCOMM.replaceInvalidHTTPChars(objCacicCOMM.enCrypt(strWin32_NetworkAdapterConfiguration )); Values['OperatingSystem' ] := objCacicCOMM.replaceInvalidHTTPChars(objCacicCOMM.enCrypt(strWin32_OperatingSystem )); + Values['SoftwareFeature' ] := objCacicCOMM.replaceInvalidHTTPChars(objCacicCOMM.enCrypt(strWin32_SoftwareFeature )); Values['PHP_AUTH_PW' ] := objCacicCOMM.replaceInvalidHTTPChars(objCacicCOMM.enCrypt('PW_CACIC',true,true )); Values['PHP_AUTH_USER' ] := objCacicCOMM.replaceInvalidHTTPChars(objCacicCOMM.enCrypt('USER_CACIC',true,true )); Values['te_so' ] := objCacicCOMM.replaceInvalidHTTPChars(objCacicCOMM.getWindowsStrId() ); diff --git a/CACIC_WMI.pas b/CACIC_WMI.pas index ab9d4c2..6882a8b 100644 --- a/CACIC_WMI.pas +++ b/CACIC_WMI.pas @@ -158,7 +158,9 @@ Begin strWhereClause := 'DHCPEnabled=TRUE and IPEnabled=TRUE'; End else if (pStrWin32ClassName = 'Win32_OperatingSystem') and (pStrColumnsNames = '') then - strColumnsNames := 'Caption,CSDVersion,InstallDate,LastBootUpTime,NumberOfLicensedUsers,OSArchitecture,OSLanguage,ProductType,SerialNumber,Version'; + strColumnsNames := 'Caption,CSDVersion,InstallDate,LastBootUpTime,NumberOfLicensedUsers,OSArchitecture,OSLanguage,ProductType,SerialNumber,Version' + else if (pStrWin32ClassName = 'Win32_SoftwareFeature') and (pStrColumnsNames = '') then + strColumnsNames := 'Accesses,Attributes,Caption,Description,IdentifyingNumber,InstallDate,InstallState,LastUse,Name,ProductName,Vendor,Version'; if (strWhereClause <> '') then strWhereClause := ' WHERE ' + strWhereClause; -- libgit2 0.21.2