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

shipping ini file along with the MSI package during build


1 reply to this topic

Murali

Murali
  • Members
  • 18 posts

Posted 29 November 2001 - 11:07

I want to put an .ini file alongside the MSI package (i.e. in DISK1 folder). I will be using this file during installation and I don't want this to get installed. How to do this when building the setup(both IDE and command line). I want this to work for both Compressed and Uncompressed mode. Any direction/tips would be very much appreciated.


KiwiGeek

KiwiGeek
  • Members
  • 19 posts

Posted 24 January 2002 - 04:42

I'm doing something like this at the moment. It's possible, but there are a couple of things you have to watch:

1) You can't get the location of the MSI file (and hence the INI file) until the ResolveSource action has taken place. If you need the INI file before this, you'll have to get it another way.
2) The INI file won't get copied across the the MSI cache ([WindowsFolder]\Installer). If any custom actions require it for maintenance/uninstall, you'll have to manually copy it across and figure out when to delete it.

I have to access my INI file very early in the installation process, so I've had to use a differnet method.
I've added a line to the Binary table in my Installshield project (ISM) file that drags in the INI file when compiling the MSI.  This way the INI file is in a known place at all times.
I've then created a simple class which all is used by all my custom action functions. This class extracts data from the Binary table into a temp file, and then deletes the temp file when the class destructs.

My hack isn't the most efficient in the world, but it does ensure that the INI file is cleaned up if the install is aborted. The only thing it doesn't allow for is making changes to the INI file, but this generally isn't an issue.