1. Home
  2. Docs
  3. Scense Embedded Scripting...
  4. Scense Native Scriptable ...
  5. Windows Installer

Windows Installer

The Windows Installer object can be used to manipulate Windows Installer Products.
The ‘Base’ object is ‘ScenseMSI’. The ScenseMSI object provides general administrative functions.

 

ScenseMSI

Properties Description
Products

 

Reference to the Products collection

 

Methods Description
Refresh Refreshes the Products collection.

 

Product

The Products collection of the ScenseMSI object consists of one or more Product objects.

Properties Description
DisplayName Product name
DisplayVersion Product version
InstallDate Date of installation
InstallLocation Path to which the product is installed
InstallSource Path from where theinstallation took place
InstallState Current Install state
1) The product is advertised
5) The product is installed locally
LocalPackage Locally stored package
ProductCode Code that uniquely identifies the product
Publisher Name of the publisher
VersionMajor Numeric version component
VersionMinor

 

Numeric version component

 

Methods Description
Reinstall Reinstall the product
Repair Repair the product installation
Uninstall Uninstall the product

Usage:

Sub Scense_Main()
    Dim P

    ScenseMSI.Refresh
    
    For Each P In ScenseMSI.Products
        WriteScenseLog P.DisplayName & " (" & P.DisplayVersion & ")"
        WriteScenseLog "InstallDate: " & P.InstallDate
        WriteScenseLog "InstallLocation: " & P.InstallLocation
        WriteScenseLog "InstallSource: " & P.InstallSource
        WriteScenseLog "InstallState: " & P.InstallState
        WriteScenseLog "LocalPackage: " & P.LocalPackage
        WriteScenseLog "ProductCode: " & P.ProductCode
        WriteScenseLog "Publisher: " & P.Publisher
        WriteScenseLog "VersionMajor: " & P.VersionMajor
        WriteScenseLog "VersionMinor: " & P.VersionMinor
    Next
End Sub