Wednesday, April 18, 2007

Collection Based on File needed (outlook.hol)

Sometimes you need to send a file to the computer multiple times. This is true with the Outlook.hol file. For those that are new to it, this file contains calendar entries for custom and standard information. Use this to file to say give the dates of company vacations or events. Of course users still need to import the functions in to Outlook. At the end of this I will show you how to add it in. To push this file you will need 1 collection with 2 queries.

Query 1: Old HOL file
---------------------
select SMS_R_System.ResourceID,SMS_R_System.ResourceType,SMS_R_System.Name,SMS_R_System.SMSUniqueIdentifier,SMS_R_System.ResourceDomainORWorkgroup,SMS_R_System.Client from SMS_R_System inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FileName = "OUTLOOK.HOL" and SMS_G_System_SoftwareFile.FileModifiedDate < "20070206 23:00:00.000" ------------------------- Query 2: No HOL file ------------------ select SMS_R_System.ResourceID,SMS_R_System.ResourceType,SMS_R_System.Name,SMS_R_System.SMSUniqueIdentifier,SMS_R_System.ResourceDomainORWorkgroup,SMS_R_System.Client from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Name not in (select distinct SMS_G_System_COMPUTER_SYSTEM.Name from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FileName = "OUTLOOK.HOL") -------------------- As you update the new HOL change the date on the OLD hold query so it will pull in computers that need the new file. As they inventory they will be removed from the query. In your package you will need to create a batch file that copies over the old one. -----copyHOL.bat----- copy /y Outlook.hol "C:\Program Files\Microsoft Office\OFFICE11\1033" -------------------- This will copy over the old file. Then simply send out a message to let people know it is up to date. Or if you update monthly or weekly let the users know. Use the popup I have listed earlier for a notice after it installs. Please note that if Outlook it open then it won't update. It is better to install when no user is logged in. To add to your outlook access the Tools Options >Calendar Options> Add Holidays

Select the new categories or click ok to update the ones you have. Please note that you need to turn on File Inventory and search for the outlook.hol file.