In my previous post, I discussed how you can use MPBPA v2 to automatically fix common issues in MPs. In order to preview the changes that MPBPA v2 makes to MPs when fixing issues, you need to have a comparer application configured in MPBPA v2. The previous post assumes that WinDiff was already configured in your environment. Today, we will discuss how to configure other applications that can preview MP changes.
In order to configure the comparer application, click Configure that is located in the top left corner of the MPBPA v2 window. (The previous post explains how to get that window to open.)
Clicking Configure will open the following window (assuming you left the default configuration intact):
Open the Preferences tab by clicking on it:
Here you can configure your comparer application by either clicking Browse and selecting it or by entering a full path to its executable.
MPBPA v2 can run any application that you configure. For the preview functionality to work correctly, your application must support the following command-line argument convention: <Application> <before> <after>
When MPBPA v2 runs the comparer applications, the following substitutions are made:
The easiest comparer application to set up with MPBPA v2 is Mp Diff. Mp Diff is a management pack comparer tool that calculates the net changes between two management packs and displays a report using the default system browser. Mp Diff is installed with the rest of System Center Operations Manager 2007 R2 Authoring Resource Kit. It is accessible from Start \ All Programs \ System Center Operations Manager 2007 R2 \ Authoring Tools \ Mp Diff (this path may vary if you use an older version of Windows).
To use Mp Diff with MPBPA v2, simply point MPBPA v2 to the location of MpDiff.exe. It will most likely be installed in \System Center MP Authoring Console 2007\MpDiff\MpDiff.exe under your Program Files folder (most often C:\Program Files\ or C:\Program Files (x86)\).
Once it’s configured you should see something similar to this in the Configure window:
Here’s a screenshot of Mp Diff being used by MPBPA v2 to fix the MP from the previous post:
WinDiff is a file comparer utility that has been around for ages. To set it up you will need to download it first. Then simply point MPBPA v2 to the location of WinDiff.exe and off you go:
You can see WinDiff in action with MPBPA v2 in the previous post:
What if the tool you want to use for previewing with MPBPA v2 does not accept command-line arguments the MPBPA v2 way? The solution is simple. Write a batch file that converts the MPBPA v2 calling convention to your tool’s calling convention. Here’s an example of such a batch file:
1: @echo off
2: echo Before MP: %1
3: echo After MP: %2
4: start iexplore %1
5: start notepad %2
The above script displays the two file names used by MPBPA v2 to save the temporary xml files, starts opens the file before changes with Internet Explorer and opens the file after the changes with Notepad. The script has no real purpose, but it illustrates the flexibility of what you can do. What your script does is really up to you, but I expect that you would simply call some command with %1 and %2 to indicate the before changes and after changes MP files, respectively. Keep in mind that MPBPA v2 does not monitor %1 and %2 for any changes, so if you edit those files your self, the changes will be ignored.
Here are the screenshots of the script in action with the MP from the previous post.
This posting is provided "AS IS" with no warranties.
Use of included tools and reports are subject to the terms specified at