[wix-users] Need to determine list of installed Adobe Products and copy a file to a subdirectory within the installed products folder
Russell Haley
russ.haley at gmail.com
Fri Feb 9 23:37:31 PST 2018
Hi, I'm also a novice but I'll take a stab at it (I call it
'learning'). So far, you presented a problem I would say is
appropriate for a batch script. However...
Perhaps each Adobe product could be viewed as a component or feature?
So you could run a custom action that makes the checks as you've
indicated and based on that result, the installer could then install
the appropriate component/feature.
Some issues I think you might run into:
1) Installing something into an installed products directory might be
bad? Not sure.
2) If it's the same file for each Adobe product, you will need to
create different wix file elements for each Adobe product. (You can't
re-use the file elements, each needs to be unique even if it's the
same file)
3) I don't believe the MSI Engine strictly "determine if the target
dir exists". The msi will create the specified path as needed so long
as the base dir exists (which you found in the custom search). I look
forward to being corrected on this if I'm wrong.
Your files.wxs could contain this:
<!--I'm lazy and only named and indented the first one-->
<!--C:\Program Files (x86)\Adobe\InDesign-->
<DirectoryRef Id="AdobeInDesignDir">
<Component Id="MyProd_InDesign"
Guid="5d023b5b-2992-4434-a0c3-c30bda50eb94" Win64="$(var.Win64)">
<File Id="spiffy_prod_file_1"
Source="c:\my_dev_env\spiffy_prod.perl" KeyPath="yes" Checksum="yes"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="AdobeProd2Dir">
<Component Id="MyProd_Adobe2"
Guid="5d023b5b-2992-4434-a0c3-c30bda50eb94" Win64="$(var.Win64)">
<File Id="spiffy_prod_file_2" Source="c:\my_dev_env\spiffy_prod.perl"
KeyPath="yes" Checksum="yes"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="AdobeProd3Dir">
<Component Id="MyProd_Adobe3"
Guid="5d023b5b-2992-4434-a0c3-c30bda50eb94" Win64="$(var.Win64)">
<File Id="spiffy_prod_file_3" Source="c:\my_dev_env\spiffy_prod.perl"
KeyPath="yes" Checksum="yes"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="AdobeProd4Dir">
<Component Id="MyProd_Adobe3"
Guid="5d023b5b-2992-4434-a0c3-c30bda50eb94" Win64="$(var.Win64)">
<File Id="spiffy_prod_file_4" Source="c:\my_dev_env\spiffy_prod.perl"
KeyPath="yes" Checksum="yes"/>
</Component>
</DirectoryRef>
In your Product.wxs:
<Feature Id="InDesign" Title="InDesign Spiffy Script" Level="1">
<ComponentGroupRef Id="MyProd_InDesign"/>
</Feature>
... And that's all I've got. I'm not sure how you'd do the searching
for the directories, but it would be a custom action of some sort. I
also don't know how you would return the results to the installer.
Your GUI could be made of one or two custom dialogs and the first
dialog runs the custom action when the user presses "next", and the
results could be displayed on the second custom dialog. The second
dialog would then trigger the installation (or cancel).
Seems like a lot of work to reproduce a graphical batch script, but I
understand the allure of a GUI installer, it offers a kind of
validation of a software product. I'd personally create a C# WinForm
project targeting 4.5. A single form could just run a batch script and
display the output. Maybe there is a way to do just that with WIX, but
I'm not really sure that's what WIX is for?
For What it's Worth,
Russ
On Fri, Feb 9, 2018 at 2:46 PM, Elizabeth Heraud via wix-users
<wix-users at lists.wixtoolset.org> wrote:
> I am a novice Wix user. I have been asked to build an installer to do the following:
>
> We have a proprietary file that we need to copy to all installations of Adobe Photoshop, Adobe Illustrator and Adobe InDesign. It is not a plugin.
> The target folder is a subfolder within the Adobe Product's installation folder. Multiple versions of each Adobe Product can exist on a machine. Each Adobe Product has a slightly different subfolder path that we need to copy our file to.
>
> The installer would need to:
>
> 1. obtain a list of all of the Adobe Products that are installed for: Photoshop, Illustrator, InDesign and get the top level folder for the product.
>
> 2. For each installed product found
>
> Determine if the targetdir exist
>
> Copy the file to the target folder
>
> How would one go about this in Wix?
>
> I have written a perl script that accomplishes the task. My thought was to call the perl script as a custom action.
>
> Any help or guidance is appreciated.
>
>
>
>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list