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

Passing the installation folder path to custom act


4 replies to this topic

ashwin

ashwin
  • Members
  • 16 posts

Posted 18 April 2003 - 05:30

Hi,

I am trying to create a package that installs the application in a user specified location. Then I create virtual directories, which have the path of the installation folder. I dont know how to pass the location of the installation to the VBScript that is creating the virtual directories. I was able to create the virtual directories as Custom Action from the VBScript with a hardcoded directory location. And In that case my Custom Action Type was 6.

If someone can help me by telling me how to do this. I would really appreciate it.

Thank you in advance
Ashwin



luke_s

luke_s
  • Full Members
  • 532 posts

Posted 22 April 2003 - 04:03

When you create the directory, make sure that you create it as a global property. e.g. "MYPATH" all in capitals.

In your next custom action, you can then use an msi function, MsiGetProperty to get this property.

alternatively, you can use MsiGetTargetPath to get a folder path

Dagostini

Dagostini
  • Members
  • 13 posts

Posted 22 April 2003 - 20:03

DEpending upon the phase of execution you may get forced to set CustomActionData. Search you MSI help for "CustomActionData" and this should show you how to do it.

In your VBScript you will need something like:
PropertyArray = Split(Session.Property("CustomActionData"), ";")

ABhatnagar

ABhatnagar
  • Members
  • 5 posts

Posted 06 November 2003 - 23:23

So how do you split this using MsiGetProperty in Visual C++?

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 09 November 2003 - 22:31

MsiGetProperty will just return a string which contains the path of your directory.

You then use either c/c++ string functions to grab the part of the directory string that you require.

You can then also use MsiSetProperty, or MsiSetTargetPath to setup extra paths.