I have this analysis which returns text from a line in an ini file:
if exists file (“C:\notes\notes.ini”) then following texts of firsts “CN=” of lines whose (it contains “CN=”) of file (“C:\notes\notes.ini”) else “n/a”
When I view my Web Report I would also like to see the computer name in the results THEN the text string
You can concat the computer name when the result is being returned from the Client, or when you generate the report.
Since I don’t know how you are going to create the Web Report, here is one way to add Computer Name fromthe Client side.
if exists file (“C:\notes\notes.ini”) then (computer name & " - " & it) of (following texts of firsts “CN=” of lines whose (it contains “CN=”) of file (“C:\notes\notes.ini”)) else “n/a”
if (exists wmi) then (computer name & " - “) of ( ((string value of selects “WorkingSetSize from win32_process where Name = ‘nsclient++.exe’” of wmi) as integer) / (1024*1024)) as string & " MB” else “Not available”
if (exists wmi and exists running applications “nsclient++.exe”) then (computer name & " - " & it as string & " MB") of ( ((string value of selects “WorkingSetSize from win32_process where Name = ‘nsclient++.exe’” of wmi) as integer) / (1024*1024)) else “Not available”
BTW, once you get on Version 8 you should move away from WMI for win32_process and use the new native Relevance Inspectors. Note (below) the big improvement in time for the operations when you move away from WMI. The cumulative effect of a few milliseconds here and there has a big effect when you start talking about 1000s of fixlets per 10,000s of machines.
q: if (exists wmi and exists running applications “besclient.exe”) then (computer name & " - " & it as string & " MB") of ( ((string value of selects “WorkingSetSize from win32_process where Name = ‘besclient.exe’” of wmi) as integer) / (1024*1024)) else “Not available”
A: SURPRISE - 13 MB
T: 32.008 ms
q: (if (exists it) then (computer name & " - " & ((working set size of it / (1024*1024)) as string) & " MB") else “Not Available”) of (process whose (name of it as lowercase is “besclient.exe”))
A: SURPRISE - 13 MB
T: 1.159 ms
Use the Relevance
properties whose (it as string contains “process”)