The Quest for Microsoft Visio
How many copies of Microsoft Visio 2003 Standard Edition are installed and used at my company? This question was posed to me by a customer last week and the answer turned out to be harder to find than I had imagined. Like Fox Mulder from "The X-Files," my search for the truth led me to unexpected places within the Altiris Notification Server 6 software. I'd like to share my discovery.
Our journey begins with Altiris Inventory Solution for Windows. When Inventory Solution for Windows runs a Software Inventory scan, every *.exe on the computer has its file header read and sent back to the Notification Server. The results of this scan include details such as the Manufacturer, the Product Name, the Product Version, the File Name, the path on the hard drive where the file is found, and many other details about the *.exe. These attributes are stored in the Altiris database in a table named Inv_AeX_SW_Audit_Software. As a rule of thumb, if every *.exe on a system is inventoried, then it would stand to reason that Inv_AeX_SW_Audit_Software would be a logical place to find which computers have Microsoft Visio 2003 Standard Edition installed right? Well, not really.
It turns out that Microsoft does not distinguish between "Standard Edition" and "Professional Edition" at the file header level. In fact, the only location on a Microsoft Windows machine that maintains which edition of Microsoft Visio is installed turns out to be the Add/Remove Programs applet found in the Windows Control Panel. Consequently Microsoft Project also exhibits this same behavior.
Ah, but we have a solution for that: Inventory Solution for Windows runs a Machine Inventory and collects the Add/Remove Program data as well. This information is also sent back to the Notification Server and stored in a table named Inv_AeX_OS_Add_Remove_Programs. Sure enough, under the NAME column we have 'Microsoft Office Visio Professional 2003' and 'Microsoft Visio Standard 2003.'
Hmm, upon closer inspection though there is one complication - if a user installed Service Pack 2, the Add/Remove Programs entry changes and is now 'Microsoft Office Visio Professional 2003 SP2.' A wrinkle indeed but something we can work with. For your reference the table below shows the possible values for Visio beginning with 2003 and up. If you have seen others listed in this table do post a comment and I'll update the table.
| Table Name | Visio appears in the NAME column as |
| Inv_AeX_OS_Add_Remove_Programs | Microsoft Office Visio Professional 2003 |
| Inv_AeX_OS_Add_Remove_Programs | Microsoft Office Visio Professional 2003 SP2 |
| Inv_AeX_OS_Add_Remove_Programs | Microsoft Office Visio Standard 2003 |
| Inv_AeX_OS_Add_Remove_Programs | Microsoft Office Visio Viewer 2003 |
| Inv_AeX_OS_Add_Remove_Programs | Microsoft Office Visio Viewer 2007 |
| Inv_AeX_OS_Add_Remove_Programs | Microsoft Office Visio 2007 Service Pack 1 (SP1) |
| Inv_AeX_OS_Add_Remove_Programs | Microsoft Office Visio 2007 Service Pack 1 (SP2) |
The next step on our journey involves Altiris Application Metering. Remember that Inventory Solution is a point in time snapshot of what is installed, but to determine if the user is running the software installed, Altiris Application Metering is required. Application Metering monitors when users start and stop an application and can also be used to deny users the ability to run specific applications. This data is sent back to the Notification Server to provide basic trending information to determine how often applications are being run.
The Altiris administrator is responsible for creating a policy for each Application necessary which is linked to the file header of an application. In our case, Microsoft Visio uses "visio.exe" but as we learned earlier from Inventory Solution there is no distinction between Standard and Professional editions at the file header level. This is okay as long as the Application Metering policy is configured to trigger off of the "File Name." I'll explain more about that later on in this article.
For now, create two Application Metering Policies - one for Microsoft Visio 2003 and one for Microsoft Visio 2007. For both, make sure the "File name" is set to "visio.exe." If desired, a third and fourth application metering policy could be configured for Visio Viewer.
With Einstein by our side (the dog not the scientist) we hop into our DeLorean DMC-12 and travel a week into the future. This is necessary to ensure Application Metering polices have had a chance to replicate to client machines, but more importantly to send data back and populate the tables.
From our clipboard we note that we have found the tables that store the inventory information, we have Application Metering policies in place to record usage, now we need to tie the inventory results to the usage information and add in purchase history. This sounds remarkably like Asset Management. Sure enough, it is now time to create a Win32 Software License using Altiris Asset & Contract Management to tie the data together.
Altiris Asset Management Solution enables software license contracts to be created that pull together data from Inventory Solution, Application Metering and from 3rd party purchasing tools through Altiris Connector Solution. In later versions of the product these solutions were renamed to the "Altiris Asset & CMDB Solution" but the basic functionality remains the same.
Note that the screenshots included in this document are from Asset & Contract Management 6.2, but keep in mind these same steps apply to the 6.5 version. At the time of this writing Asset 7 has not shipped therefore it is unknown how this behavior will change when the new version is released.

The screenshot above captures the end goal which is to show usage summary data for the different versions of Visio. Setting up a Win32 Software License in Contract Management could be an article in itself so for brevity I'm only going to highlight the special steps necessary to create what is shown under the "Software License Search Rule" which is where the link between Application Metering and Inventory Solution is established.
Note in the screenshot how the installation counts are correct and usage information is broken down by version. For additional details on adding some of the other data in the screenshot such as linking Software Purchases, User and Computer Authorization and Contract Payment information, consult the Product Guides or other Symantec Connect Articles.
To reiterate, this will be a different process than what is normally required and the reason for this difference is that we have to link the Application Metering data (which is based on File Header) to the Inventory Solution data (based on an entry in Add/Remove Programs.) This link is achieved by first creating a new collection on the NS where Asset & Contract is installed. Remember - the name of the Collection is what will be used in the Software License Search rule.
The table below includes the SQL used for the collections. Note that they should be dynamic collections.
| Collection Name | SQL Used to build collection |
| Microsoft Office Visio Professional 2003 | select vcomputer.[GUID], vcomputer.[Name], arp.[Name] as 'Product Name' from Inv_AeX_SW_Audit_Software SWA left outer join vcomputer on vcomputer.GUID = swa._ResourceGuid left outer join Inv_AeX_OS_Add_Remove_Programs ARP on ARP._ResourceGuID = swa._ResourceGUID where swa.[File Name] = 'visio.exe' and arp.[Name] like 'Microsoft Office Visio Professional 2003%' |
| Microsoft Office Visio Standard 2003 | select vcomputer.[GUID], vcomputer.[Name], arp.[Name] as 'Product Name' from Inv_AeX_SW_Audit_Software SWA left outer join vcomputer on vcomputer.GUID = swa._ResourceGuid left outer join Inv_AeX_OS_Add_Remove_Programs ARP on ARP._ResourceGuID = swa._ResourceGUID where swa.[File Name] = 'visio.exe' and arp.[Name] like 'Microsoft Office Visio Standard 2003%' |
| Microsoft Office Visio Viewer 2003 | select vcomputer.[GUID], vcomputer.[Name], arp.[Name] as 'Product Name' from Inv_AeX_SW_Audit_Software SWA left outer join vcomputer on vcomputer.GUID = swa._ResourceGuid left outer join Inv_AeX_OS_Add_Remove_Programs ARP on ARP._ResourceGuID = swa._ResourceGUID where swa.[File Name] = 'vviewer.exe' and arp.[Name] like 'Microsoft Office Visio Viewer 2003%' |
| Microsoft Office Visio 2007 | select vcomputer.[GUID], vcomputer.[Name], arp.[Name] as 'Product Name' from Inv_AeX_SW_Audit_Software SWA left outer join vcomputer on vcomputer.GUID = swa._ResourceGuid left outer join Inv_AeX_OS_Add_Remove_Programs ARP on ARP._ResourceGuID = swa._ResourceGUID where swa.[File Name] = 'visio.exe' and arp.[Name] like 'Microsoft Office Visio 2007 %' |
| Microsoft Office Visio Viewer 2007 | select vcomputer.[GUID], vcomputer.[Name], arp.[Name] as 'Product Name' from Inv_AeX_SW_Audit_Software SWA left outer join vcomputer on vcomputer.GUID = swa._ResourceGuid left outer join Inv_AeX_OS_Add_Remove_Programs ARP on ARP._ResourceGuID = swa._ResourceGUID where swa.[File Name] = 'vpreview.exe' and arp.[Name] like 'Microsoft Office Visio Viewer 2007' |
We must pause for a moment to talk about a few setup considerations. If you have a single NS server with Asset and App Metering you can skip this paragraph. Otherwise a few important points are in order. In most multiple NS server setups, clients talk to a child NS, then inventory forwarding is used to send inventory data to a reporting server. The top level reporting server is also where Asset & Contract are typically installed. The Application Meters would be created on each of the child NS servers however the collections should only be created on the server where Asset & Contract are installed. They are not necessary on the down-level facing NS Servers. More importantly, ensure that the Inventory Forwarding rule on each client facing NS server is configured to forward Application Metering summary data. Without this data, usage information will not be available.
With the collections in place on the Asset & CMDB server, using the Altiris 6.5 Console, navigate to the Win32 Software License page found at View > Solutions > Asset > Asset > Resources > Contract Types > Software Licensing > Software Licenses > Win32 License. Click on the star icon to create a new License. Fill out the Win32 License Name then click on the Software Installs tab. Under the "Software License Search Rules" section click on the Add button. In the screenshot below taken from Asset 6.2 four different versions of Visio have been specified.

Note that the only thing that should be added here is the File Name which is visio.exe. Under the "Scope Collections" click on the ellipses and when the picker is displayed, navigate to the collections you created earlier. As indicated in the screenshot, create a new row for each version of Visio that is necessary. Apply the changes to the contract. Clicking on the Summary tab now displays results similar to the first screenshot in this article.
You can repeat this process using Microsoft Project or any other application where you need to link Inventory Solution to Application Metering.
Excellent article
I like your approach to tieing app metering data with your license, and use of scope collections. We actually seperate our licenses per version, e.g. Viso 2003 Standard, Visio 2007 Standard, etc. Then we use the version information in the header to scope the collection properly along with the Add/Remove Programs entry. A bit more complicated, so I do like your approach.
Good article!
This is similar to how we do our software compliance, however I've found that you need to include an extra search rule that uses the Add/Remove 'Product Name' without a File Name filter (i.e. just 'Microsoft Visio 2003 Professional').
Reason being is that it's more than likely (especially if you've only recently deployed the metering agent), that there are PC's out there that have never run visio.exe, therefore the start event has never been created for that PC, hence it doesn't appear in the Installation count on the Summary page.
This is the case for our environment and configuration, but may not be for everyone's. Give it go and see if it makes a difference to your counts.
Depends What you are tracking !
Nice article: Using "software audit" or not to inventory "Visio" ? Well, depends what you are tracking for:
So you should build collections & reports based what you need ;-)
Notice: if you create a collection based both "name" + "version", just care not using 2 filters, or use 2 filters & edit in advanced to change the SQL for merging the 2 conditions in a single one, using "AND": Because there is a problem if you use "filters" instead of "SQL": you select "visio" and "2003", and you got also "visio 2007" with "winzip 2003" computers ! ;-) So fun !
But if you are starting a project to manage your software, please take a look in CMS 7, the inventory rule are integrated inside the software catalog, yo can not only detect which is visio 2003 etc... But also, which is using you customized or standard installation package, and which is not.
For sure, we can not integrate AMS because not yet version 7 is there. So, you can not upgrade your CMS/AMS6 to version 7 yet, But you can install a separate CMS 7, and use the KB 47224 https://kb.altiris.com/article.asp?article=47224&p=1 to forward data to AMS6 server. Enjoy ;-)
~~PaKo @ www.BeMore.ch (Sorry for the Bad English, did you speak French ? Join us https://www-secure.symantec.com/connect/groups/gro... )
Would this work for other scenarios?
I have an application that just shows the name of the application in both the Add-Remove entry and the executable header. The publisher sent me a document that says I can get the version and edition information either from another entry in the registry or from a file found in the same folder as the executable. I'm looking for ways to get the two pieces of information from one of these sources without alot of customized work.
Does anyone know if the Uninstall and Install registry entries are pulled into an existing Altiris table that would be available in the Resource drop-down list or by way of the previously mentioned SQL scripts?
Is there an easy way to pull into Altiris the contents of a file with a suffix of .key?
nicely done but i would like
nicely done
but i would like to see the next step if possible
if you still go with viso 03 of visio 2007 or project scenarios, the next step would be,
how do you or would you stop from going beyond your licences available.
if you have 30 project licences, and when the 31st hits, what will happen.
thanks
Would you like to reply?
Login or Register to post your comment.