So I think I've found the problem. I just don't know how to fix it.
If you look at the pasted mark up below you'll see that my executable is put
in the "C:\Program Files\MyAppDirectory\" directory unless the user chooses
a different directory. Then the value of INSTALLDIR is changed.
<!--Install Directory-->
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Id="INSTALLDIR">
<Directory Id="MyAppDirectory" Name="MyAppD"
LongName="MyAppDirectory">
<Component Id="MainExecutable"
Guid="21334B69-B902-4910-AC4D-73337405DC70" DiskId="1">
<!--Main Executable-->
<File Id="MyAppExe" Name=" MyApp.exe" Source="MyApp.exe"
Vital="yes"/>
</Component>
</Directory>
</Directory>
</Directory>
Now everything installs correctly and all shortcuts and such work...but the
app won't launch. For testing, instead of launching the app I had a
property set with the value of [#MyAppExe]. The log results show that even
though INSTALLDIR was pointing to "C:\InstallTest\" the value of [#MyAppExe]
was still "C:\Program Files\MyAppDirectory\MyApp.exe".
How does this work? The application installs correctly and all the
documentation I've read says I should be able to have a customaction execute
MyAppExe and it will know where it's installed. What have I missed?
On 6/30/07, McGoogus McGrapple <[EMAIL PROTECTED]> wrote:
After digging through the archives I've discovered others have had this
problem but no solution was found. Hopefully I'm not out of luck.
I have created an installer that allows the user to specify a directory to
install the application to. I also have a checkbox on my final dialog that
allows the user to start to launch the app. Typical install type stuff.
If the user installs the app to a directory OTHER than the default
directory the application will not launch at the end of the install. I've
tried a
multiple work arounds with no luck. Below are pieces of my wix project
that I think are important. Running a verbose log returns little useful
information. Just that my custom action ends with a return value 1631.
<!--Install Directory-->
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Id="INSTALLDIR">
<Directory Id="MyAppDirectory" Name="MyAppD"
LongName="MyAppDirectory">
<Component Id="MainExecutable"
Guid="21334B69-B902-4910-AC4D-73337405DC70" DiskId="1">
<!--Main Executable-->
<File Id="MyAppExe" Name=" MyApp.exe"
Source="MyApp.exe" Vital="yes"/>
</Component>
</Directory>
</Directory>
</Directory>
<!--Custom Action Used to Launch the App After Installation-->
<CustomAction Id="LaunchApplication" FileKey="MyAppExe" ExeCommand=""
Return="asyncNoWait" />
<!--Control In My Exit Dialog-->
<Control Id="Finish" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Cancel="no" Text="[Button_Finish]">
<Publish Event="DoAction" Value="LaunchApplication">(NOT Installed)
AND (LAUNCHPRODUCT = 1)</Publish>
<Publish Event="EndDialog" Value="Return">1</Publish>
</Control>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users