PDA

View Full Version : Getting the Revision number from Summary Information via VBScript



tyacko
04-12-2006, 02:43 PM
This seems like it should be a simple thing to do, but I need your help with this.

I need to make sure the cached MSI file is removed during the un-installation because it is being left behind. I've done some searching on this issue and have found that the "Package Code" is stored in the table Summary Information in the field "Revision Number".

The thing I'm struggling with in vbscript is how do I find the current msi handle so that I can get to this table. When we used to InstallScript installations I remember there was a InstallShield property called MsiHandle that I could use to open the DB, but since we've moved to Basic MSI installs, I don't want to install the installshield engine. It was more problematic than it was worth.

OK, long story short... Can anyone show me a vbscript example of how I can get the msi handle of the current install? I want to call my custom action during the un-install process.

Like I said, this is probably an easy issue to solve I just can't figure it out.

Thanks in advance for any help you can provide.

RobertDickau
04-12-2006, 03:19 PM
In VBScript custom actions, the Session object corresponds to the handle to the running installation. For other items, you can create an instance to the Installer object and calls methods from that.

(As a curiosity, there seems to be an undocumented PackageCode property storing that value.)