/build/static/layout/Breadcrumb_cap_w.png

Generate (create) MST with standard template

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

Answers (6)

Posted by: EdT 10 years ago
Red Belt
2
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.
Posted by: EdT 10 years ago
Red Belt
0
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.
Posted by: ekgcorp 10 years ago
10th Degree Black Belt
0
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.
Posted by: anonymous_9363 10 years ago
Red Belt
0
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.
Posted by: EdT 10 years ago
Red Belt
0
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.
Posted by: Pressanykey 8 years ago
Red Belt
0
Hi,
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....
Phil
 
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