Jack,
Here's what I learned. The Common Information Model (CIM) is part of the Windows Management Instrumentation (WMI) architecture. The CIM defines objects in the managed environment through classes. These classes include methods to describe behavior and properties to describe data. Some objects included in the CIM are applications, networks, printers, and drivers.
The CIM repository is an object database where defined objects — such as static class definitions and instances that are used to access and manipulate system management information — are stored.
A query can be run against the CIM Object Manager (CIMOM).
So here is a solution that works very well. Sorry it's in C# but at least you'll get some translating practice. By the way, desktop apps can only be written in C#. Just kidding.
Kyle
using System.Management;
string drive = "\"c:\"";
string filename = "\"test\"" ;
string extension = "\"exe\"";
string qry = String.Format( "select * from cim_logicalfile where drive={0} and filename={1} and extension={2}", drive, filename, extension); ManagementObjectSearcher query = new ManagementObjectSearcher(qry); ManagementObjectCollection queryCollection = query.Get(); foreach(ManagementObject mo in queryCollection) {
Console.WriteLine( "Name '{0}'

ath: '{1}' ",mo["Name"], mo["Path"]); }