I don't think the version key that you are using is very reliable, I don't
have it on my machine but I do have the InstallPath.

Msdn states that the reglocator key column is of the type regPath which is
formatted so properties should be usable, but I don't think you can guarantee
the search order to allow you to use one registry searches results from
another. Also the wix docs say RegistrySearch@Key is a string so it may not
be formatted from wix.

You could of course try a FileSearch based on the ProgramFiles folder.

The other way of doing it is to have several registry searches for each
acrobat version that you support (I recall us doing something like this a
while ago to search for Word).

Oh and another thing to note is that you are reading type raw which will add
a # to the beginning of some data types found so if the version is an actual
number that would be wrong.

Also your second search's type should be directory.

You can set a property inside your custom action and a property can be used
as a directory ID.



-----Original Message-----
From: bradley.jo...@thomsonreuters.com
[mailto:bradley.jo...@thomsonreuters.com] 
Sent: 04 March 2011 15:52
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Installation path of Adobe/Return a value from
aCustomAction

I'm able to copy a file using the custom action, letting the Custom
Action (in this case an .exe) handle the entire process.  

I'm still wondering if there's a way to use the Property Id's and
Registry Search to handle this. 

What is the best practice for determining an installation path that
could be different based on what is installed on the users machine?  In
this case a version of Adobe. 

Thanks for any suggestions. 

Brad

-----Original Message-----
From: Jones, Bradley (TA WSS) 
Sent: Wednesday, March 02, 2011 4:59 PM
To: WiX-users@lists.sourceforge.net
Subject: [WiX-users] Installation path of Adobe/Return a value from a
CustomAction

I'm looking for the best way to find a version of Adobe that's installed
on a user's machine.  This will determine the installation path of some
files to deploy. 

 

I've tried the following:

 

    <Property Id="ACROBAT_VERSION">

      <RegistrySearch

        Id="Acrobat_Version"

        Root="HKLM"

        Key="SOFTWARE\Classes\AcroExch.Document\AcrobatVersion"

        Type="raw"/>

    </Property>

 

    <Property Id="ACROBATPATH">

      <RegistrySearch

        Id="AcrobatPath"

        Root="HKLM"

        Key="HKEY_CURRENT_USER\Software\Adobe\Adobe
Acrobat\VERSION\InstallPath"

        Type="raw"/>

    </Property>

 

The issue I have here is depending on what version the user has
installed, "VERSION" changes.  

 

Is there a way to pass a Property Id to part of the key, for example:

HKEY_CURRENT_USER\Software\Adobe\Adobe
Acrobat\[ACROBAT_VERSION]\InstallPath

 

The above does not work, but was wondering if there's a way to
accomplish this?

 

I also thought of going the route of a custom action, I've written an
exe that returns the path to Adobe. 

I've written an .exe and called from a custom action:  If there's a way,
what is the syntax to return a value from a custom action?

 

Can a Custom action return a value that I can pass to a Directory or use
as a DirectoryRef?

 

    <DirectoryRef Id="PROPERTYRETURNEDFROMCUSTOMACTION">

        <Component Id="FindAdobeLocation.exe" Guid="GUID HERE">

          <File Id="FindAdobeLocation.exe" Source="SourceLocation"
KeyPath="yes" Checksum="yes" />

        </Component>

      </DirectoryRef>

 

 

 

Thanks for any suggestions. 

 

Brad

------------------------------------------------------------------------
------
Free Software Download: Index, Search & Analyze Logs and other IT data
in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT
data 
generated by your applications, servers and devices whether physical,
virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-----------------------------------------------------------------------------
-
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to