Hello. I've very new to Wix, and was slowly working my way through building an installer, when I ran into a snag. I need to create a shortcut to javaws.exe. It's typically found in "Program Files" or "Program Files x86", under Java/jreX/bin. I thought I would chain together AppSearches, looking through likely paths, but I can't get even one to work right.
This works nicely:
...
<!--Properties we will need during install-->
<Property Id="JAVA_WS_PATH">
<DirectorySearch
Path="C:\Program Files\Java\jre7\bin"
AssignToProperty="no"
Id="Path_Search">
<FileSearch
Name="javaws.exe"
Id="JavaWs_Search"/>
</DirectorySearch>
</Property>
...
<Shortcut Id="MenuShortcut_Tester"
Name="Tester"
Description="This is a test shortcut."
Target="[JAVA_WS_PATH]"
Arguments="http://naof-oee-31003/main/system/launch/client/Enterprise_OEE.jnlp"
Icon="ShortcutIcon" />
...
Unfortunately, this requires that I already know where the file is.
This doesn't work:
...
<!--Properties we will need during install-->
<Property Id="JAVA_WS_PATH">
<DirectorySearch
Path="[ProgramFilesFolder]"
Id="ProgramFiles_Search">
<DirectorySearch Path="Java"
Id="Java_Search">
<DirectorySearch Path="jre7"
Id="JRE_Search">
<DirectorySearch Path="bin"
Id="Bin_Search">
<FileSearch
Name="javaws.exe"
Id="JavaWs_Search"/>
</DirectorySearch>
</DirectorySearch>
</DirectorySearch>
</DirectorySearch>
</Property>
...
<Shortcut Id="MenuShortcut_Tester"
Name="Tester"
Description="This is a test shortcut."
Target="[JAVA_WS_PATH]"
Arguments="http://naof-oee-31003/main/system/launch/client/Enterprise_OEE.jnlp"
Icon="ShortcutIcon" />
...
In the logs, I get the following:
MSI (c) (74:E0) [18:16:58:282]: Doing action: AppSearch
MSI (c) (74:E0) [18:16:58:282]: Note: 1: 2205 2: 3: ActionText
Action 18:16:58: AppSearch. Searching for installed applications
Action start 18:16:58: AppSearch.
AppSearch: Property: JAVA_WS_PATH, Signature: JavaWs_Search
MSI (c) (74:E0) [18:16:58:282]: Note: 1: 1322 2:
MSI (c) (74:E0) [18:16:58:282]: Note: 1: 1322 2:
Action ended 18:16:58: AppSearch. Return value 1.
It looks like something was found, but instead of returning a path, AppSearch
returns the ID of the file search. I'm baffled.
--L. Wasserman
--Lisa Wasserman
Amazon, NACE, AST
[email protected]<mailto:[email protected]>
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users

