4

I have a msi file. I want to get the Revision Number of this file.

I can get it by properties->summary ({690D33BD-602F-4E71-9CB5-1CF2E9593DEE})

But I want to get this number using .net code.

So can u please help me out in this...

saschabeaumont
  • 22,080
  • 4
  • 63
  • 85
Sunil Agarwal
  • 4,097
  • 5
  • 44
  • 80

1 Answers1

2

What you're after is called the Package Code.

Here's an example to retrieve using VBscript (unfortunately I'm not familiar with .NET):

Dim installer, database

Set installer = CreateObject("WindowsInstaller.Installer")
Set database = installer.OpenDatabase ("my.msi", 0)

Dim sumInfo  : Set sumInfo = installer.SummaryInformation("my.msi", 0)
sPackageCode =  sumInfo.Property(9) ' PID_REVNUMBER = 9, contains the package code.

WScript.Echo sPackageCode
saschabeaumont
  • 22,080
  • 4
  • 63
  • 85