Commit bd50634ab14f8a29775da739617ec2eac34c7fcc
1 parent
5713fcc4
Exists in
master
Insere nova classe WMI para trazer dados de software da estação de trabalho.
git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/agente-windows@1429 fecfc0c7-e812-0410-ae72-849f08638ee7
Showing
2 changed files
with
6 additions
and
1 deletions
Show diff stats
CACIC_Comm.pas
| ... | ... | @@ -34,6 +34,7 @@ var tStringStrResponseCS : TStringStream; |
| 34 | 34 | strWin32_ComputerSystem, |
| 35 | 35 | strWin32_NetworkAdapterConfiguration, |
| 36 | 36 | strWin32_OperatingSystem, |
| 37 | + strWin32_SoftwareFeature, | |
| 37 | 38 | strTeDebugging : String; |
| 38 | 39 | Begin |
| 39 | 40 | Try |
| ... | ... | @@ -52,6 +53,7 @@ Begin |
| 52 | 53 | strWin32_ComputerSystem := fetchWmiValues('Win32_ComputerSystem' ,objCacicCOMM.getLocalFolderName); |
| 53 | 54 | strWin32_NetworkAdapterConfiguration := fetchWmiValues('Win32_NetworkAdapterConfiguration',objCacicCOMM.getLocalFolderName); |
| 54 | 55 | strWin32_OperatingSystem := fetchWmiValues('Win32_OperatingSystem' ,objCacicCOMM.getLocalFolderName); |
| 56 | + strWin32_SoftwareFeature := fetchWmiValues('Win32_SoftwareFeature' ,objCacicCOMM.getLocalFolderName); | |
| 55 | 57 | |
| 56 | 58 | objCacicCOMM.writeDebugLog('Comm: Povoando lista com valores padrão para cabeçalho de comunicação'); |
| 57 | 59 | objCacicCOMM.writeDebugLog('Comm: pStrActionMessage: "' + pStrActionMessage + '"'); |
| ... | ... | @@ -67,6 +69,7 @@ Begin |
| 67 | 69 | Values['ModuleProgramName' ] := objCacicCOMM.replaceInvalidHTTPChars(objCacicCOMM.enCrypt(ExtractFileName(ParamStr(0)) )); |
| 68 | 70 | Values['NetworkAdapterConfiguration'] := objCacicCOMM.replaceInvalidHTTPChars(objCacicCOMM.enCrypt(strWin32_NetworkAdapterConfiguration )); |
| 69 | 71 | Values['OperatingSystem' ] := objCacicCOMM.replaceInvalidHTTPChars(objCacicCOMM.enCrypt(strWin32_OperatingSystem )); |
| 72 | + Values['SoftwareFeature' ] := objCacicCOMM.replaceInvalidHTTPChars(objCacicCOMM.enCrypt(strWin32_SoftwareFeature )); | |
| 70 | 73 | Values['PHP_AUTH_PW' ] := objCacicCOMM.replaceInvalidHTTPChars(objCacicCOMM.enCrypt('PW_CACIC',true,true )); |
| 71 | 74 | Values['PHP_AUTH_USER' ] := objCacicCOMM.replaceInvalidHTTPChars(objCacicCOMM.enCrypt('USER_CACIC',true,true )); |
| 72 | 75 | Values['te_so' ] := objCacicCOMM.replaceInvalidHTTPChars(objCacicCOMM.getWindowsStrId() ); | ... | ... |
CACIC_WMI.pas
| ... | ... | @@ -158,7 +158,9 @@ Begin |
| 158 | 158 | strWhereClause := 'DHCPEnabled=TRUE and IPEnabled=TRUE'; |
| 159 | 159 | End |
| 160 | 160 | else if (pStrWin32ClassName = 'Win32_OperatingSystem') and (pStrColumnsNames = '') then |
| 161 | - strColumnsNames := 'Caption,CSDVersion,InstallDate,LastBootUpTime,NumberOfLicensedUsers,OSArchitecture,OSLanguage,ProductType,SerialNumber,Version'; | |
| 161 | + strColumnsNames := 'Caption,CSDVersion,InstallDate,LastBootUpTime,NumberOfLicensedUsers,OSArchitecture,OSLanguage,ProductType,SerialNumber,Version' | |
| 162 | + else if (pStrWin32ClassName = 'Win32_SoftwareFeature') and (pStrColumnsNames = '') then | |
| 163 | + strColumnsNames := 'Accesses,Attributes,Caption,Description,IdentifyingNumber,InstallDate,InstallState,LastUse,Name,ProductName,Vendor,Version'; | |
| 162 | 164 | |
| 163 | 165 | if (strWhereClause <> '') then |
| 164 | 166 | strWhereClause := ' WHERE ' + strWhereClause; | ... | ... |