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

Comments

Please log in to comment

Community Chosen Answer

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.
Answered 09/18/2014 by: EdT
Red Belt

Please log in to comment

Answers

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.
Answered 09/18/2014 by: EdT
Red Belt

Please log in to comment
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.
Answered 09/18/2014 by: ekgcorp
Tenth Degree Black Belt

Please log in to comment
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.
Answered 09/19/2014 by: VBScab
Red Belt

Please log in to comment
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.
Answered 09/19/2014 by: EdT
Red Belt

Please log in to comment
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
Answered 01/13/2016 by: Pressanykey
Red Belt

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