in

myITforum.com

Rick Jones

SMS Top Level Technician ~90,000 SMS clients Microsoft MVP-SMS 2006
  • Custom Updates Scan Tool inventory for MS07-054

    Ok, so like most SMS tech's I found myself without a standard SMS inventory for MS07-054.

    I had installed the Custom Updates Scan Tool and thought, hey... I have that thing installed and haven't really had a good use for it yet.  This gave me the perfect oportunity to get it working.

    What I used for my criteria is based off the batch file posted in KB942416 http://support.microsoft.com/kb/942416

    We don't support windows 2000 in our environment so I did not build that into my criteria so, if you have windows 2000 they are not supported by this posted method.

    I Build the criteria for the patch;

    Prerequisite Rules

    <lar:And>

    <bar:WindowsVersion Comparison="GreaterThanOrEqualTo" MajorVersion="5" MinorVersion="1" ServicePackMajor="2" ServicePackMinor="0" ProductType="1" />

    <bar:FileExists Path="msn messenger\msnmsgr.exe" Csidl="38" />

    </lar:And>

    Installed Rules

    <bar:FileVersion Path="msn messenger\msnmsgr.exe" Csidl="38" Comparison="GreaterThanOrEqualTo" Version="8.1.0.0" />

    Installable Rules

    <bar:FileVersion Path="msn messenger\msnmsgr.exe" Csidl="38" Comparison="LessThan" Version="8.1.0.0" />

     

     I also filled in as much information about the KB as i could find, KB, Article ID, Severity, Description.

    Here is the  Cab file (in a zip as thats the only file type allowed here) for importing this into your Custom Updates Scan Tool console.

    MS07-054_XPSP2.zip 

     

    To get the Source file to upgrade the client to MSN Messenger 8.1 I took the clue from the above mentioned KB I downloaded the MSN Messenger 8.1 package;

    For Windows XP and later operating systems, download Windows Live Messenger 8.1.0178. To do this, visit the following Microsoft Web site:

    Run the installation package by using the /C switch to extract the MsnMsgs.msi file, and then copy the file to the BIN folder that you created in step 1.

     I used the following command;

    MD C:\MessengerContents

    Messenger.exe /C /T:"C:\MessengerContents"

     

    Once that package was extracted I have the raw MSI for just Messenger without all of the Frills.

    You then use the SMS DSUW and deliver the patch as you normally would with SMS.

    When it asks for the source files, I used the one from the extracted folder as my source file.

     

  • A Different way to SMS_DEF.MOF

    One of the most complicated things that an SMS Technician will find himself/herself involved with is making modifications to the SMS_DEF.MOF.

    With SMS SP3, I found myself like every other SMS Technician trying to wrap my mind around the vast changes in the SP3 MOF.

    This time I got lost in the changes and the customizations that I needed to make for use in our environment.  I am a programmer at heart, so I look for ways to modularize my work and found myself wishing for a way to modularize the SMS_DEF.MOF changes.

    I have found that debugging the modifications to the original SMS_DEF.MOF has left me lost as to what was the original and what was my changes.  Then when there is a problem with something I have changed, I have to go back to a backup file, find the change and reverse that change and hopefully that fixed the problem.

    This needed to be simplified for me, modularized.  So what you see below is my "Compilation process" for making changes to the SMS_DEF.MOF.

     

    The basic process is a batch file that steps out the build process and a vbscript for making strategic modifications to the final compiled SMS_DEF.MOF.

    I put this entire process into a folder for compiling, this is the process for setting up this structure.

    • Rename the SMS SP3 SMS_DEF.MOF to sms_defSP3Orig.mof
    • Put all new tables into sms_def_CustomAdditions.mof
    • Extract the contents of the ZIP file to the folder (contains my MOF_C_FileChanger.vbs and a couple of .ccf files and a compile.cmd)
    • Make changes to the compile.cmd to add in Customization Change File tweaks ( the acronym for the .CCF files)

    The compile.cmd when run will copy together the SMS_defSP3Orig.mof and SMS_def_CustomAdditions.mof into sms_def.mof and then using the MOF_C_FileChanger script, processes each Customization Change.

    Here is an example of a basic compile.cmd file;

    @echo off
    Echo Copying sms_defSP3Orig.mof + sms_def_CustomAdditions.mof + SMS_def_Script.mof to sms_def.mof
    copy sms_defSP3Orig.mof /A + sms_def_CustomAdditions.mof /A + SMS_def_Script.mof /A sms_def.mof

    echo Compiling MOF_C_Changes.CCF
    cscript.exe //Nologo MOF_C_FileChanger.vbs sms_def.mof MOF_C_Changes.CCF

    Now your thinking.... what is the script doing with the control file?  The script is basicly doing a block change. (the entire BLOCK MUST MATCH exactly with all spaces for it to be found and replaced)  Anything between the line that starts with [[ORIGINAL BEGIN]] and [[ORIGINAL END]] is replaced with the block contents between [[REPLACEMENT BEGIN]] and [[REPLACEMENT END]].  Example; (here is the contents of the MOF_C_Changes.CCF file;

    NOTE: The indent is used here for ease of reading and is NOT in the MOF_C_Changes.CCF file.

    [[ORIGINAL BEGIN]]
    //==================================================================
    //
    // SMS_DEF.mof - Maps SMS inventoriable set to that provided by
    //               the WBEM CIMV2 Win32 Provider - version 1085
    //
    // Copyright (c) Microsoft Corporation, All Rights Reserved
    //
    //==================================================================

    //==================================================================
    [[ORIGINAL END]]

    [[REPLACEMENT BEGIN]]
    //==================================================================
    //
    // SMS_DEF.mof - Maps SMS inventoriable set to that provided by
    //               the WBEM CIMV2 Win32 Provider - version 1085
    //
    // Copyright (c) Microsoft Corporation, All Rights Reserved
    //
    //==================================================================
    //
    // *****************************************************************
    // ***** This MOF was compiled with MOF_C_FileChanger changes  *****
    // ***** Please see end of document for changes details        *****
    // *****************************************************************
    //
    //==================================================================
    [[REPLACEMENT END]]

    You can string together as many changes as you like.  For instance, in my environment, I made a change to the Hosting Model in the AAInstProv to fix a problem with the SMS_DEF.MOF file being compiled on a Vista workstation.

    Add this to the compile.cmd 

    echo Compiling MOF_C_AAInstProv_HostingModel.ccf
    cscript.exe //Nologo MOF_C_FileChanger.vbs sms_def.mof MOF_C_AAInstProv_HostingModel.ccf

    MOF_C_AAInstProv_HostingModel.ccf

    [[ORIGINAL BEGIN]]
    instance of __Win32Provider as $AAInstProv
    {
      Name    = "AAInstProv" ;
      ClsId   = "{86875FDD-EB5D-4742-8026-94B2E31E1AB9}";
      ImpersonationLevel = 1;
      PerUserInitialization = "False";
    };
    [[ORIGINAL END]]

    [[REPLACEMENT BEGIN]]
    //
    // Customization adjustment by Rick Jones
    // Added HostingModel for Vista support.
    //(NOTE: Will not compile on Windows 2000)
    //
    instance of __Win32Provider as $AAInstProv
    {
        Name    = "AAInstProv" ;
        ClsId   = "{86875FDD-EB5D-4742-8026-94B2E31E1AB9}";
        ImpersonationLevel = 1;
        PerUserInitialization = "False";
        HostingModel = "LocalSystemHost:SMS";
    };
    [[REPLACEMENT END]]

    What about if you wanted to turn off reporting of some table?

    Add this to the compile.cmd

    echo Compiling MOF_C_AAInstProv_DisableInstalledSoftware.ccf
    cscript.exe //Nologo MOF_C_FileChanger.vbs sms_def.mof MOF_C_AAInstProv_DisableInstalledSoftware.ccf

    MOF_C_AAInstProv_DisableInstalledSoftware.ccf

    [[ORIGINAL BEGIN]]
    [ dynamic, provider("AAInstProv"),
      SMS_Report     (TRUE),
      SMS_Group_Name ("Installed Software"),
      SMS_Namespace  (TRUE),
      SMS_Class_ID   ("MICROSOFT|INSTALLED_SOFTWARE|1.0") ]
    [[ORIGINAL END]]

    [[REPLACEMENT BEGIN]]
    //
    // Customization adjustment by Rick Jones
    // Disabled Reporting
    //
    [ dynamic, provider("AAInstProv"),
      SMS_Report     (FALSE),
      SMS_Group_Name ("Installed Software"),
      SMS_Namespace  (TRUE),
      SMS_Class_ID   ("MICROSOFT|INSTALLED_SOFTWARE|1.0") ]
    [[REPLACEMENT END]]

     

    This ZIP file is a working basic structure of the compiler including the script and the MOF_C_Changes.ccf file.

    MOF_Compiler.zip

    This is an updated version for use with ConfigMgr.

    MOFCompiler_ConfigMgr.zip

Copyright - www.myITforum.com, Inc. - 2007 All Rights reserved.
Powered by Community Server (Commercial Edition), by Telligent Systems