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

dynamically resolving property name in file path


2 replies to this topic

Mariscal

Mariscal
  • Full Members
  • 50 posts

Posted 14 May 2010 - 00:51

Hi,

I have a property name that I need to include as part of a path name, but it is not being resolved: [<property>] is actually created as a sub-folder on the target machine, e.g., \Program Files\<product name>\[<property>].

I've tried a custom action using the directory identifier of the [property] folder, but that didn't work. Either I've incorrectly set up the CA, or I'm just going about it wrong.

This is an Installshield 2010 basic msi project.

If anyone has suggestions, it would be most appreciated!

Edited by Mariscal, 14 May 2010 - 00:52.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 14 May 2010 - 12:04

This should work, assuming that:
  • you want to use C:\Program Files\<product name>\[<property>] as the target folder for a component
  • C:\Program Files\<product name>\ is your INSTALLDIR
I'll use YOURPROP instead of <property> to avoid any bracket misunderstandings.

Create your component with a default (dummy) destination folder. Go to the component properties and look up the directory property that InstallShield created for it, e.g. {DUMMYFOLDER}

Create a custom action type 51 (set a property) with:
Property: DUMMYFOLDER
Value: [INSTALLDIR][YOURPROP]

Insert this custom action in the UI and Execute sequences, before CostInitialize.


Mariscal

Mariscal
  • Full Members
  • 50 posts

Posted 14 May 2010 - 22:43

Thanks, Stefan, that fixed it! My error was in the way I was assigning the DUMMYFOLDER value. Incidentally, I added the CA to After CostFinalize.

Thanks again.