Month – December 2009

Null and Not like

SELECT     DisplayName0,     Count(*) AS ‘Count’,     Publisher0,     @CollID as CollectionID FROM     v_Add_Remove_Programs arp     JOIN v_FullCollectionMembership fcm on arp.ResourceID=fcm.ResourceID WHERE     fcm.CollectionID = @CollID     AND (         ARP.DisplayName0 not like ‘%hotfix%’         AND ARP.DisplayName0 not like ‘%update%’         AND ARP.DisplayName0 not like ‘%Screen Saver%’         AND ARP.DisplayName0 not like ‘%silverlight%’ […]

Testing for exist codes with SMSI

Here is sample code on how to test for an exist code using SMS Installed.   item: Execute Program   Pathname=%win%\notepad.exe   Default Directory=%win%\   Flags=00000010 end item: If/While Statement   Variable=PROCEXITCODE   Value=0 end item: Display Message   Title English=Exit Code   Text English=Notepad exited with a code of 0   Flags=00100100 end item: […]

Really!

I have to laugh at this item that is for sale on www.UsedOttawa.com !   Every so often I go looking to see what is for sale, anyways I keep running to the this AD where some guys is trying to sell “Brand new Microsoft Office System Beta 2 Kit 2003”! That right BETA 2! […]

management nightmare

SELECT Distinct R .Netbios_Name0, ARP .DisplayName0, OS .Caption0 FROM dbo .v_R_System R INNER JOIN dbo.v_GS_ADD_REMOVE_PROGRAMS ARP ON R.ResourceID = ARP.ResourceID INNER JOIN dbo.v_GS_OPERATING_SYSTEM OS ON OS.ResourceID = ARP.ResourceID WHERE ARP .DisplayName0 in ( ‘Microsoft Office Professional Edition 2003’, ‘Microsoft Office Enterprise 2007’, ‘Microsoft Office Professional Plus 2007’, ‘Microsoft Office Project Professional 2003’, ‘Adobe Indesign CS3’, […]

Limiting to a Collection.

  SELECT Distinct R .Netbios_Name0, ARP .DisplayName0 FROM dbo .v_R_System R INNER JOIN dbo.v_GS_ADD_REMOVE_PROGRAMS ARP ON R.ResourceID = ARP.ResourceID Inner Join dbo.v_FullCollectionMembership FCM ON R.ResourceID = FCM.ResourceID and CollectionID = ‘SMS00001’ WHERE ARP .DisplayName0 in ( ‘Microsoft Office Professional Edition 2003’, ‘Microsoft Office Enterprise 2007’, ‘Microsoft Office Professional Plus 2007’, ‘Microsoft Office Project Professional 2003’, […]

Why v_GS_OPERATING_SYSTEM.Caption0 is better than v_R_System.Operating_System_Name_and0

Take the following query, if you only used v_R_System.Operating_System_Name_and0 then you would have no idea as to which PCs are installed with “Microsoft Windows 7 Ultimate” or “Microsoft Windows 7 Professional”.     Select       R.Name0,       R.Operating_System_Name_and0,       OS.Caption0 From       dbo.v_R_System r       left outer join dbo.v_GS_OPERATING_SYSTEM OS on R.ResourceID = OS.ResourceId Where […]

Servers Report Query

SELECT         R.Netbios_Name0,     os.Caption0,     ARP.DisplayName0 As ‘Softwarename’,     ARP.Publisher0 as ‘Publisher’,     ARP.Version0 as ‘version’,     ARP.ProdID0 as ‘productID’,     ARP.InstallDate0 ‘InstallDate’,     R.AD_Site_Name0 as ‘ADSite’,     R.User_Name0 as ‘Last Logged on User’,     R.Operating_System_Name_and0 as ‘OS’ FROM             dbo.v_R_System R     inner JOIN dbo.v_Add_Remove_Programs ARP ON R.ResourceID = ARP.ResourceID     inner join […]