/build/static/layout/Breadcrumb_cap_w.png

Adding template mst inside another mst

Hi All,

I have created a mst template with all the basic properties inside it. Now whenever I get a vendor msi and we create a transform (mst) out of it, I would like to incorporate this template mst into the newly generated mst. Can someone please tell how can we achive this???
I have created this mst template to bring down the effort of everytime adding the properties.

Thank you in advance.

0 Comments   [ + ] Show comments

Answers (13)

Posted by: cygan 14 years ago
Fifth Degree Brown Belt
0
if you are using wps then I am afraid you will need to run installtailor
broswe to your msi and where it says base mst browse to your mst template and then you can create a new mst with those existing properties

well that's if you need to customize the installation
Posted by: MSIPackager 14 years ago
3rd Degree Black Belt
0
How do you create your transforms?

Personally I always create a copy of the vendor MSI, make all the changes to that and then use msitran.exe to generate the transform.

That way you can use msimerge (or better still vbscript) to make the standard changes to the copy of the vendor MSI, before you generate the MST.

Rergards,
Rob.
Posted by: captain_planet 14 years ago
Black Belt
0
You can use the Windows Installer API to apply multiple transforms to an MSI and spit out a combined one. You're not having my script, but I'll provide you with the basics. This script has no error handling. It merely gives a brief example of how to implement this technique using the relevant API calls. Obviously with a bit of work you can make it accept dynamic files for its input, as opposed to the static ones defined below......enjoy. [;)]
'Create file system object
Dim fso: Set fso = CreateObject("Scripting.FileSystemObject")

'retrieve path to original msi
Dim originalMsiPath : originalMsiPath = "c:\test\QuickFacts.msi"

'make a backup copy of it for us to work On
Dim backupCopyMsiPath : backupCopyMsiPath = Replace(originalMsiPath,".msi","_backup.msi")
fso.CopyFile originalMsiPath,backupCopyMsiPath

'retrieve original path to transform A
Dim transformA : transformA = "c:\test\a.mst"

'retrieve original path to transform B
Dim transformB : transformB = "c:\test\b.mst"

'Specify a name for your 'combined' transform
Dim transformCombined : transformCombined = "c:\test\aAndb.mst"

'Create installer object
Dim installerObject: Set installerObject = CreateObject("WindowsInstaller.Installer")

'Open the 'backup' installer
Dim backupDatabase: Set backupDatabase = installerObject.OpenDatabase(backupCopyMsiPath, 1)

'apply all your transforms to it
backupDatabase.ApplyTransform transformA, 63
backupDatabase.ApplyTransform transformB, 63

'commit the change
backupDatabase.Commit

'Now find the difference between your original MSI, and the backed up MSI with the MSTs applied.....
Dim installerDatabase: Set installerDatabase = installerObject.OpenDatabase(originalMsiPath, 0)
backupDatabase.GenerateTransform installerDatabase, transformCombined

'The Summary Info. Stream NEEDS generating - if i recall this was a bug i discovered in one of the scripts provided in the Windows Installer the SDK.
backupDatabase.CreateTransformSummaryInfo installerDatabase, transformCombined, 0, 0

Set installerObject = Nothing
Set backupDatabase = Nothing
Set installerDatabase = Nothing

'Delete your backup file
fso.DeleteFile(backupCopyMsiPath)
Set fso = Nothing

Posted by: anonymous_9363 14 years ago
Red Belt
0
Cap'n P, what the OP wants - if my reading is correct - is a similar way to handle MST creation for MSIs to the way that Wise has a template for MSIs, such that you could include your client's standard properties and so on which Installtailor would then use as a base. I haven't tried it myself but Cyg's approach sounds plausible.
Posted by: captain_planet 14 years ago
Black Belt
0
Yeah, I agree VBScab. Didn't give it a proper read. Oh well....for all you Orca users out there.....[:D]
Posted by: kiptek 14 years ago
Second Degree Green Belt
0
Well, in WPS, it might be a good idea to go back & look up John's various posts on macros (both here, his blog, & on Symantec) b4 he went the WIX route
Posted by: bubble_buzz21 14 years ago
Senior Yellow Belt
0
I have tried the script, it does create a third mst, but it doesnot merge the two mst's. is there any other approach, which could help me?

Thanks in Advance.
Posted by: captain_planet 14 years ago
Black Belt
0
I've just copied and pasted the code from the post above and it works fine for me. What was up with Cygan's approach anyway?
Posted by: bubble_buzz21 14 years ago
Senior Yellow Belt
0
the code does work but it will not merge the two mst information, i could only see the changes of the base mst(in this case A.mst).

about the Cygan's approach, that was first approach i tried which doesnot work.
Posted by: captain_planet 14 years ago
Black Belt
0
...for the static example i provided, you need to manually ensure 'c:\test' is created and that it contains 'c:\test\QuickFacts.msi', 'c:\test\a.mst' and 'c:\test\b.mst'. Apply both transforms to the MSI using Orca beforehand, just to ENSURE they both make transformations to the original MSI. Logically it should work, so I suspect one of your transforms doesnt do what you think it does. As for Cygan's approach, I don't know if this will help, but try creating a new 'Active Project' in Wise before you perform the Install Tailor routine.....
Posted by: cygan 14 years ago
Fifth Degree Brown Belt
0
about the Cygan's approach, that was first approach i tried which doesnot work

you can customize an mst with another mst can't you

I created a blank mst with properties ie rootdrive, arpsystemcomponent etc ,etc

ran installtailor to cutomize my msi and browsed to my base mst with all the properties.
created a new mst and all my settings from my base mst still exist in the new mst
Posted by: bubble_buzz21 14 years ago
Senior Yellow Belt
0
Orca doesnot allow to apply two mst to base msi. so i tried applying one template mst to the base msi and generate the base mst, the base mst when viewed doesnot reflect the template changes, Note the i have some custom action and files added to the template mst.
So i tried to merge two msi , base msi and the template.msi using msimerge.exe provided by SDK. that works ,the base msi will have the transform.msi changes merged in the base.msi. but the command line throws the error.
Error 1627. Error merging two database, Check _MergeErrors Table for Merge conflicts.
No idea how do i resolve this above error.
Posted by: captain_planet 14 years ago
Black Belt
0
Orca doesnot allow to apply two mst to base msi - i meant apply them individually, not cumulatively.....
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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