Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

MSI Programming


2 replies to this topic

Superfreak3

Superfreak3
  • Full Members
  • 437 posts

Posted 09 February 2007 - 19:02

I am in need of some programming pointers as I want to edit the File table to set the Version to the maxim of 65535.0.0.0 for some files, the names of which will be read from a .txt file.

This is to work around our installation authoring tool not having the ability to set the Always Overwrite bit as in InstallShield. We have some rogue files placed for support purposes, and I want to ensure the are replaced.

I can program the part to read the .txt file (I would prefer to use VB.NET), but I would need some assistance in opening the .msi, editing the table based on name match, then closing the database.

Any pointers, code snippets, etc. would be greatly appreciated.

Thanks as always!!

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 11 February 2007 - 21:30

Did you know you can specify the version number inside InstallShield, by disabling the setting "use system information" (or something like that)?

VBScript code to edit an MSI file is in sample "Using Dual ListBoxes as Replacement for a Multi-Selection ListBox" where it is used to add a custom table.
http://www.installsi...si/articles.htm

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 11 February 2007 - 22:32

Another option for rouge files is to use a custom action before costing to delete the files so that MSI installs the file you want (you can run into permission problems).

You can tweak the REINSTALLMODE property value to force overwrite all files regardless of version, but this is not recommended since it will apply to all files in the MSI, including merge module and any system files (which you shouldn't install in the first place). The value to use in this case is normally REINSTALLMODE = amus (normal is omus).
Regards
-Stein Åsmul