How do I use a wildcard for add remove program information?

 

Question:

What I really could use is report #96 ("Computers with specific software registered in Add Remove Programs"), that allows me to include a wildcard, so I can find not only "Adobe Acrobat 8.0.0 Professional", but "Adobe Acrobat 7.0.8 Professional", and "Adobe Acrobat 8.1.2 Professional" and all other versions w/in a particular collection.
SMS forces me to pick a specific one.  I could use report #99 ("Count of all instances of software registered with Add or Remove Programs"), but I'm only interested in "Adobe Acrobat % Professional". 
Anybody have an easy button for this?

~~~

[Steve] Great question, created a report like this to solve a very similar problem. Interestingly, had to use this report today, just before reading your question. I named the report:

“Computers with software (like) registered in Add Remove Programs”

It contains 2 prompts, one for add remove program name, and one for collection id. Here is the base report query (amended 3/18/08 to add the Group by statement):

Select sys.Netbios_Name0, fcm.SiteCode, sys.User_Domain0, sys.User_Name0, sys.Operating_System_Name_and0, arp.DisplayName0

FROM v_R_System sys

JOIN v_GS_ADD_REMOVE_PROGRAMS arp ON sys.ResourceID = arp.ResourceID

JOIN v_FullCollectionMembership fcm on sys.ResourceID=fcm.ResourceID

WHERE DisplayName0 LIKE @displayname and fcm.CollectionID=@CollID

GROUP BY sys.Netbios_Name0, fcm.SiteCode, sys.User_Domain0,

sys.User_Name0, sys.Operating_System_Name_and0, arp.DisplayName0

Define 2 prompts

clip_image002

Prompt Name:

displayname

Prompt SQL Statement:

begin

if (@__filterwildcard = '')

Select DISTINCT DisplayName0 FROM v_GS_ADD_REMOVE_PROGRAMS order by DisplayName0

else

Select DISTINCT DisplayName0 FROM v_GS_ADD_REMOVE_PROGRAMS

WHERE DisplayName0 like @__filterwildcard

order by DisplayName0

end

clip_image004

Prompt Name:

Collid

Prompt SQL Statement:

begin

if (@__filterwildcard = '')

select CollectionID, Name from v_Collection order by Name

else

select CollectionID, Name from v_Collection

WHERE CollectionID like @__filterwildcard

order by Name

end

clip_image006

When you’ve put it all together is should look like this:

clip_image008

Published Thursday, March 13, 2008 11:19 AM by sthompson

Comments

# re: How do I use a wildcard for add remove program information?

Thursday, March 13, 2008 3:56 PM by skissinger

Excellently explained!  Thanks.

Powered by Community Server (Commercial Edition), by Telligent Systems