[wix-users] Open short cut with non-default browser

Carlos Sosa carlos.sosa.us at outlook.com
Wed Dec 6 09:29:09 PST 2017

Hello, I can create a shortcut just fine but when trying to open it with non-default browser and thus inserting quotes on the Target URL I keep getting an error:
I tried:

<SetProperty Id="URL" Value='"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" http://mywebsite' Sequence="execute"  Before="CreateShortcuts" />

<SetProperty Id="URL" Value='"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" http://mywebsite' Sequence="execute"  Before="CreateShortcuts" />

Tried using a variable as in:

<?define Foo = '"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"' ?>
<SetProperty Id="URL" Value='$(var.Foo) http://mywebsite' Sequence="execute"  Before="CreateShortcuts" />

I also tried change it here (with a few combinations):

    <Component Directory="DesktopFolder"
      <Shortcut Id="DesktopShortcut"
                Target="$(var.Foo) [URL]"
                Icon ="icon.ico"/>
      <RemoveFolder Id="RemoveDesktopShortcut"
        KeyPath="yes" />


But every time I get an error:
Warning 1909 could not create the shortcut .... Verify that the destination Folder exists...

>From the log:
MSI (s) (A0:EC) [09:20:35:287]: Executing op: ShortcutCreate(Name=MyWebSite,,,FileName="C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" http://MyWebSite,,,Icon=icon.ico,,,,,,,,)
MSI (s) (A0:EC) [09:20:35:287]: Note: 1: 1402 2: HKEY_CLASSES_ROOT\.Dim 3: 2
MSI (s) (A0:EC) [09:20:35:287]: Note: 1: 2105 2: -2147024809 3: MyWebSite.lnk
MSI (c) (24:F0) [09:20:35:302]: Font created.  Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg

Warning 1909.Could not create Shortcut MyWebSite.lnk. Verify that the destination folder exists and that you can access it.

If I create the shortcut manually it works fine, I think it has to do with the way the quotes are being passed, I just can't figure out how to set them correctly.
Any Help is appreciated.

Thank You.

More information about the wix-users mailing list