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

Modifying public properties set by AppSearch


4 replies to this topic

RayKode

RayKode
  • Full Members
  • 58 posts

Posted 11 November 2005 - 17:00

Happy Friday to everyone,

The environment:
Basic MSI
InstallShield Professional Windows Installer edition 2.3

Some backround:
I populate a number of public properties by looking for registry values and the locations of specific files by way of the AppSearch standard action.

And, this works just fine.


The goal:
I want to override the value of one of the public properties that AppSearch sets.

IE:
AppSearch runs and populates a public property named "RAYSPROP" with a path to a specific exe that is somewhere on the hard drive.


I have tried to modify the value of the public properties that is set by AppSearch via a command line entry such as RAYSPROP="C:\Rays" .

I can't seem to make this work.

It's almost as if the public property "RAYSPROP" is set to "C:\Rays" until the AppSearch standard action is run.
At which time "C:\Rays" is replaced with the results of the AppSearch.

The Request:
Any ideas as to how I might "over ride" the value of a public property set by the AppSearch standard action ?

Thanks in advance for any advice.

Ray in Wisconsin




Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 12 November 2005 - 16:06

Are you specifying this value on the command line only?:

msiexec /i test.msi PROPERTY=Value

If what you are doing is the above it is not surprising that it does not work. When appsearch runs it will override the property set at the command line. I think you would rather need to insert a SetProperty custom action into the appropriate place in the InstallExecute sequence. To be honest I have never done this, and I am not sure where in the sequence it should be, but you could try an immediate custom action right before InstallInitialize.
Regards
-Stein Åsmul

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 12 November 2005 - 18:14

Yes, you can use a custom action to set the property. The custom action type is 51 and it can be immediate. You could insert it after AppSearch in both the UI and the Execute sequence.

RayKode

RayKode
  • Full Members
  • 58 posts

Posted 14 November 2005 - 14:14

Good Monday morning from Wisconsin.

First:
Thanks for your responses.


I'm going to try your suggestions this morning (after I get through a week ends worth of e-mails) and I'll update my post as to the results.

Second:
I AM setting the value as "msiexec /i test.msi PROPERTY=Value"


You folks are the greatest.

Thanks again.

Ray in Wisconsin

RayKode

RayKode
  • Full Members
  • 58 posts

Posted 15 November 2005 - 17:34

BINGO !

Your suggestions worked perfectly.


A short explanation of what I did:
The property that is being set by the AppSearch action is named "PRODUCTDIR"

I created an additional public property. IE: PRODUCTFOLDER

Then, after AppSearch runs, I have a custom action that checks for the the existence of the public property named PRODUCTFOLDER:

If it exits, then I do an MsiGetProperty to retrieve the value of PRODUCTFOLDER followed by an MsiSetProperty to reset the value of PRODUCTDIR.

Thanks again folks and take care.

Ray in Wisconsin.