We have some standard applications which needs to be repackaged every month. The repackaging process is same and does not change at least for these packages. So I was actually looking at automating these things.

What I did so far.

First we have created an object for Windows installer. I have then taken a copy of the original msi and then opened the database of this temporary msi database in transact mode. Once the database is opened we can use select, insert, update and delete statements to update the database.  

I could successfully add a registry to the msi. The component is also added successfully to the component table. I also could make changes to the Property table.

The tricky part comes with the addition of file to the file table.

The addition of file requires the following steps.

1. Add a new row to the file table. This can be done with the Insert statement.

2. We then need to associate the file to a new component or any other component already existing in the msi. In my case I am creating a new component.

3. We then have to associate this components to a feature in the FeatureComponents table.

4. Since the file I am adding is a non-versioned file, a new row also has to be added to the MSIFILEHASH table.

I could see the changes that I have done using the mst. But when I try to install the msi with the mst, I get the error 2725. I checked everything. All the other steps except for the file addition works fine.

Skipped the file addition part to the msi. Every other change that I make works and I am able to install the msi with the mst successfully.

If you guys think, that this is not a right forum for this question, please let me know the right forum. I have been stuck with this issue from the past 6 months. Any help would really be appreciated.

1 Comment   [ + ] Show Comment

Comments

  • Cvvamsi could you please provide the vbscript to add registry file
Please log in to comment

Community Chosen Answer

2
2725 indicates that one of the tables is bad. I suspect you may have either an insufficient number of columns in your INSERT statement of have invalid data in a row (too many characters, incorrect data type, etc.)

Have you considered using Wix? A lot of software houses use it to automate the building of their installers.
Answered 02/19/2015 by: VBScab
Red Belt

Please log in to comment

Answers

1

Hi All,


Can you please provide me the vbscript to add the reg file even I am looking for the same on urgent basis

Answered 02/22/2016 by: gornalsadmin
White Belt

Please log in to comment
Answer this question or Comment on this question for clarity