[wix-users] Creating a single Shortcut that runs Excel (or other app) and opens multiple documents
Johnny del Toro
jd.toro.991 at gmail.com
Fri Feb 26 11:33:27 PST 2016
I am VERY new to WiX toolset. Forgive me if this seems like a basic
question, but I can't work it out myself nor find hints anywhere online
about creating anything more than single file simple shortcuts with WiX.
During installation, I need to create a single shortcut that will load
Excel and open a series of Excel spreadsheets. i.e. the target needs to
look something like:
".......\Office*??*\EXCEL.EXE" MyAddin.xll sheetA.xls sheetB.xls
I want to do it in a way that will ensure that the shortcut will be valid
for any version of Excel installed and to any path. So I wrote the
following code to search the registry for the application associated with
<!-- 1. Read the Default key value for HKCR/.xll -->
<!-- 2. Read the Default key value for the Command to run the
Then I created my Shortcut with this:
<Component Win64="$(var.Win64)" Id="CMP_MYShortcutRoot"
Name="My Excel Add-in"
Description="My Excel Add-in"
Target="[EXCELEXEPATH] [DirMyInstallRoot]MyAddin.xll" />
But this doesn't work. During runtime, I get warning:
Warning 1909. Could not create shortcut My Excel Add-in.lnk Verify that the
destination folder exists and that you can access it.
I tried changing the Target value to
Arguements="/e /p [DirMyInstallRoot] MyAddin.xll" />
But I still get the same error.
If I take [EXCELEXEPATH]out of the Target and replace it with
[DirMyInstallRoot]MyAddin.xll, the shortcut is created OK.
Any hints or pointers I could get to fix this would be greatly appreciated.
Thanks for taking the time to read this,
More information about the wix-users