Software Deployment Question

Generate (create) MST with standard template

09/18/2014 6499 views
Hi everyone,
I want to generate a MST which is automatically come standard properties, and ect using template. How can i do any script (vbscript, IS script or powerscript) ?
I am using installshield. Thank you. 
0 Comments   [ + ] Show comments


Community Chosen Answer

I forgot to mention that the reason I would avoid a solution where there is a template MST, is that as soon as you move away from just adding in some properties, you generate the need to create components (eg for registry entries). This then creates a component GUID, and unless you remember to ALWAYS change the GUID on a new project, that component will not install if another component with the same GUID is already installed. Instead, the reference count for that component GUID will be implemented. You will also have broken a key rule in MSI packaging that states that no two different components should ever have the same GUID.
Answered 09/18/2014 by: EdT
Red Belt

All Answers

Download a copy of the Windows Installer SDK, part of the platform SDK, from Microsoft.
There are many examples in VBScript which manipulate the MSI tables. You could code a simple routine that inserts your "template" values into a copy of any MSI you are working on, then runs one of the utilities in the SDK which compares the modified MSI with the original MSI and generates a transform with the differences.
The Wise macro language also had this capability but I don't think there is a direct equivalent in Installshield.
Answered 09/18/2014 by: EdT
Red Belt

Sounds like you want to create a Template so you can apply similar changes to MST's for each MSI you get from vendor.  If that is the case, you can open up InstallShield to a Basic MSI project, then open up Media\Releases to create a new Release with your MSI settings. You can then save it on the network. It should be an empty MSI, From this point create an MST against that MSI and make all of the changes you want to apply to the MST's. Save that MST, then anytime you need it, you can copy it to same folder as the Vendors MSI your wanting to edit, and I always change the name to be the same as MSI, then when you call it via CMD line, you can remember it. I have also seen some people that name it same as company, (ex: itninja.mst) 

The reason for creating MST from clean MSI, is that it is less likely that there will be missing Tables when applying it to your Vendor's MSI.

Never mind, go with EdT's method above, seems more straight forward.
Answered 09/18/2014 by: ekgcorp
10th Degree Black Belt

I use InstEdit to write out the tables - generally just Property and Registry - which I want to be templated. I then import the tables into my new MST. Easy.
Answered 09/19/2014 by: anonymous_9363
Red Belt

VBScab's solution is indeed simple, and applies equally to ORCA. The one issue I have encountered using this method occurs when the table schema of the target MSI does not quite match the table schema of the written out tables. In ORCA this manifests as a "Replace" action rather than a "Merge" action being offered when you try to import the table.  It's easy to edit the schema on the exported tables however.
Answered 09/19/2014 by: EdT
Red Belt

better late than never, but here is my suggestion...

I have created a simple c# app that reads information from a xml file, and given a MSI file will generate a MST using the information from the xml file (adding a branding feature, adding a branding component, generate a guid for the component, add registry keys to the MSI, assign them as resources to the branding component, condition for the component and of course the standard properties.) I initially created a command line driven vbs script as a POC. I heavily used the vbs scripts from the MSI SDK as inspiration. It is doable if you are comfortable with "programming" and are willing to put some effort into it, unfortunately I cannot release the code here.
Another possibility is to use a packaging tool that uses templates to create a MST. AFAIK only RayPack is capable of this that respects the underlying MSI's summary table.

just my tuppence....
Answered 01/13/2016 by: Pressanykey
Red Belt

This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ