Enumerate Installed Com Objects Explained

Posted By admin On 06.10.19

I'm having the same problem, but with trying to include a media file folder on a separate hard drive than where I had installed windows 8. It has literally, thousands.

  1. Com Objects Explained
  2. Vbscript Enumerate Object Properties

Microsoft® Windows® 2000 Scripting Guide Knowing the software packages that have been installed on a computer is useful for many reasons. Among other things, this knowledge helps you:.

Gain insight into what the computer is used for. A computer that does not have a word processor installed is probably not used for writing memos or other documents. Ensuring that only licensed software, and only approved software, is in use in your organization. If your organization has decided to standardize on Microsoft Excel, it is very useful, for both support and legal reasons, to know whether anyone has installed a different spreadsheet program on a computer. Tracking the progress of software deployment projects (for example, the number of people who have installed this new application and the number of people who have not).

Tutorial

Planning for future software needs. These activities cannot be carried out using Group Policy because the Software Installation and Maintenance component does not provide information on the software installed on a computer; it only makes that software available for installation. For example, although the Software Installation and Maintenance component can publish a software package, it provides no way to track which users install that package. This makes it difficult to analyze actual software use or to make projections for future software needs. The WMI Win32Product class enables you to enumerate the software installed on a computer, provided the software was installed by using the Windows Installer. Selected properties available through the Win32Product class are shown in Table 8.14.

Table 8.14 Win32Product Properties Property Description Caption Short description of the object. Description Object description. IdentifyingNumber Product identification, such as a serial number on software. InstallLocation Location of the installed product.

Hot wheels mechanix setup static ip. Hope it helps.

InstallState Installed state of the product. Values include: -6 -Bad configuration -2 - Invalid argument -1 - Unknown package 1 - Advertised 2 - Absent 6 - Installed Name Commonly used product name. PackageCache Location of the locally cached package for this product. SKUNumber Product SKU (stock-keeping unit) information.

Vendor Name of the product's supplier. Version Product version information. Scripting Steps Listing 8.12 contains a script that enumerates the software installed on a computer and then saves the information to a text file. To carry out this task, the script must perform the following steps:. Create an instance of the FileSystem Object. This object will be used to write the retrieved software information to a text file.

Create the text file C: Scripts Software.tsv. Write the field headers to the text file in tab-separated-values format. The VBScript constant VbTab is used to insert a tab character between each field header.

Com Objects Explained

The tab-separated-values format is used because software property values sometimes contain commas. If they do, these extra commas can make it difficult to parse a text file saved in comma-separated-values format. Create a variable to specify the computer name.

Vbscript Enumerate Object Properties

Use a GetObject call to connect to the WMI namespace root cimv2, and set the impersonation level to 'impersonate.' . Use the ExecQuery method to query the Win32Product class. This query returns a collection consisting of all the software products installed on the computer. For each software product installed on the computer, retrieve the property values for the application and write those values to the text file, separating each value using a tab character. Close the text file. Listing 8.12 Enumerating Installed Software.