Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How to apply a transform?


5 replies to this topic

Matthias1967

Matthias1967
  • Full Members
  • 92 posts

Posted 11 December 2008 - 09:00

Hello,

I am trying to use transforms with an InstallShield 9 Basic MSI project, but it does not work so far.

We use multi-language setups, so some language-specific transforms already exist when I build the MSI file.

To test the transform mechanism, I opened the MSI file in the IDE, added a property "ThisIsANewProperty" with the value "Transform was here!" and saved as a Transform with the name "SetProp.mst" (in the same folder as the MSI file).

After this, the MSI file is left untouched and the new MST file (4 KB size) exists. Fine so far.

In order to apply the transform, I now open the MSI file again, add a property TRANSFORMS with the value SetProp.mst, and save it.

From what I read in the Windows Installer documentation, I now expect the Windows Installer to apply this transform before installing the MSI.

However, the log file does not look like my transform having been applied. At the beginning, the language transform (1033.mst, as I chose English in the language dialog) is copied to temp and validated, then there is a line

QUOTE
MSI © (E4:88) [08:35:13:677]: TRANSFORM: Applying regular transform to database.


100 lines later:
QUOTE
MSI © (E4:88) [08:35:13:677]: Transforms are not secure.
MSI © (E4:88) [08:35:13:677]: Transforming table Property.

MSI © (E4:88) [08:35:13:677]: Command Line: TRANSFORMS=1033.MST SETUPEXEDIR=W:\PVCS\MyPath\Release 1\DiskImages\DISK1 CURRENTDIRECTORY=W:\PVCS\MyPath\Release 1\DiskImages\DISK1 CLIENTUILEVEL=0 CLIENTPROCESSID=6116
MSI © (E4:88) [08:35:13:677]: PROPERTY CHANGE: Adding PackageCode property. Its value is '{028192F3-21AF-4970-9B83-E63648BA3D53}'.
MSI © (E4:88) [08:35:13:677]: PROPERTY CHANGE: Modifying TRANSFORMS property. Its current value is 'SetProp.mst'. Its new value: 'W:\PVCS\MyPath\Release 1\DiskImages\DISK1\1033.MST'.
MSI © (E4:88) [08:35:13:677]: Product Code passed to Engine.Initialize:          ''
MSI © (E4:88) [08:35:13:677]: Product Code from property table before transforms: '{D0815222-1598-4A7C-A924-4599A63FC80B}'
MSI © (E4:88) [08:35:13:677]: Product Code from property table after transforms:  '{D0815222-1598-4A7C-A924-4599A63FC80B}'


My Transform is not applied - I do not see the property I introduced.

So how can I make my transform co-exist with the language transform from IS?

Regards,

Matthias

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 12 December 2008 - 12:36

Since the transform will modify the installaer database, I believe it has to be applied before the database is loaded and runs. In other words, it doesn't work from the property table. Instead it has to happen from the "outside", i.e. on the command line.

Matthias1967

Matthias1967
  • Full Members
  • 92 posts

Posted 12 December 2008 - 12:59

Sorry, but I do not actually understand this.

Are there any transforms that do not modify the installer database?

In addition:

How do I tell InstallShield to have the windows Installer apply my transform? If I add TRANSFORMS=SetProp.mst to the MSI command line, I suspect (have not tried yet) that it will conflict with TRANSFORMS=1033.mst which is generated by the language selection in setup.exe.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 12 December 2008 - 15:38

I meant: therefore you can't apply *any* transform by adding the TARNSFORM property to the Property table.

I haven't tried either but I'd expect that setup.exe would combine the transform command line arguments.

Matthias1967

Matthias1967
  • Full Members
  • 92 posts

Posted 15 December 2008 - 16:15

It works! smile.gif

However, I have not found it mentioned in the "Transforms" section of the Windows Installer documentation that you cannot add the TRANSFORMS property to the Property table.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 15 December 2008 - 18:08

No it doesn't seem to be documented, it was just my 2 cents - that a msi package can't be modified using a transformwhen it's already running.