Adding files to MSI package without compiling the MSI
Is there a way to add files to an exisiting MSI package without compiling the package?
I believe I have not made the question clear, hence rephrasing the question.
There is a requirement from a team (non-technical) that they should be able to put uncompressed external files alongwith the MSI package and package should install the files correctly. This will avoid them coming to the packaging team again and again for addition of files. The external files which the team would put will be related to different languages.
Answers (7)
I would not suggest you to change the MSI directly. You should use a transform file to edit the MSI.
Though there are ways to add files to MSI directly. If you edit it in WISE or Installshield, add the files and save it, it will add the files inside the MSI.
You can do this with ORCA as well. Use MakeCab to create a cab file. Add it to binary table. Create entry in File Table and media table. Be cautious of the LastSequence.
Still I will say.. DO NOT DO THIS...
Use MST.
Hi,
If files are not registrable files then you can create a custom action or VBS file in which you can give a fix path of source and destination.
So whenever user will copy new files in source folder you have to run your MSI which copy those files to the destination folder.
Comments:
-
But the file names wil vary. - SilentKiller 12 years ago
Give them Admin Image of your MSI package...
Comments:
-
But I want to add files which are different from the ones which are already included in the package. The new files will differ in size and name. - SilentKiller 12 years ago
How about giving the users modify rights to the local folder where you want the new files "installed". Then create a simple batch script to copy the files you want from a share where the users have read access?
COPY "\\server\share\folder\*.*" "%PROGRAMFILES%\YourApp" /Y
Also; Is there a reason why you don't want to use a transform?
>Is there a way to add files to an exisiting MSI package without compiling the package?
In a word, no. The MSI needs to know file sizes, dates, etc. in order to determine their installed state.
>You can do this with ORCA as well
The poster stated that the team updating the folder is a non-technical team and that there is a requirement to NOT compile the MSI.
My solution would be a scripted one, whereby the updating team would deposit the new files and then run the script which would compare the MSI's content against the folder's content, create a list of the new/updated files and add these to the MSI via the WindowsInstaller.Installer object model.
As you might suspect, this is a distinctly non-trivial undertaking but not an impossible one.