[wix-users] URL shortcut using a specific browser

Phill Hogland phill.hogland at rimage.com
Mon Feb 13 14:12:27 PST 2017


This is what I was suggesting, modified to your sample code:


<Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="DesktopFolder" Name="Application Shortcut">
        <Component Id="ApplicationShortcut" Guid="{My_GUID}">
          <RegistryValue Root="HKCU" Key="Key Location" KeyPath="yes" Type="string" Value=""/>
          <!-- Like others said, I don't think you can do this with InternetShortcut, but you can use Shortcut
          <util:InternetShortcut Id="AppShortcut"
                    Name="Application"
                    Target="https://website.gov/login"
                    Type="link"/>
                    -->



          <Shortcut Directory="DesktopFolder" Id="AppShortcut"
                    Name="Application" Description="some description"
                    Target="[MY_URL]"
                    Icon="myIcon.aspx"
                    Advertise="no"/>

          <RemoveFolder Id="ApplicationShortcut" On="uninstall"/>
        </Component>
      </Directory>
    </Directory>

    <!-- Make sure that the Icon/@Id has the same .xxx as the file being targeted by the shortcut, regardless of the extension of the icon file.  .aspx may not be correct for your situation. -->
    <Icon Id="myIcon.aspx" SourceFile="<path to the icon file>Application.ico" />
    <SetProperty Id="MY_URL" Value="chrome.exe https://website.gov/login" Sequence="execute"  After="InstallInitialize" />

    <!-- Use a SetProperty as above and the shell32 name of the browser
    <Property Id="CHROMEFOUND">
      <DirectorySearch Id="PrgFiles" Path="[ProgramFilesFolder]">
        <DirectorySearch Id="ChromeDir" Depth="3" AssignToProperty="yes">
          <FileSearch Id="chrome_exe" Name="chrome.exe"/>
        </DirectorySearch>
      </DirectorySearch>
    </Property>
    -->


________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Marshall, Matthew M (DSHS/DCS) <marshmm at dshs.wa.gov>
Sent: Monday, February 13, 2017 10:40:31 AM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] URL shortcut using a specific browser

Hello,

I'm having a hard time figuring out how to make a desktop URL shortcut that opens in a specific browser. I am fairly new to WiX, so I'm not sure if this is possible. We have a shortcut folder for various resources used by our staff in their work.  Our computers use IE as the default browser but I need  one of the resources to open using Chrome. Is this something that can be done?

This is my current code:

<Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="DesktopFolder" Name="Application Shortcut">
        <Component Id="ApplicationShortcut" Guid="{My_GUID}">
          <RegistryValue Root="HKCU" Key="Key Location" KeyPath="yes" Type="string" Value=""/>
          <util:InternetShortcut Id="AppShortcut"
                    Name="Application"
                    Target="https://website.gov/login"
                    Type="link"/>
          <RemoveFolder Id="ApplicationShortcut" On="uninstall"/>
        </Component>
      </Directory>
    </Directory>

    <Property Id="CHROMEFOUND">
      <DirectorySearch Id="PrgFiles" Path="[ProgramFilesFolder]">
        <DirectorySearch Id="ChromeDir" Depth="3" AssignToProperty="yes">
          <FileSearch Id="chrome_exe" Name="chrome.exe"/>
        </DirectorySearch>
      </DirectorySearch>
    </Property>

I have tried adding [CHROMEFOUND] in front of the URL address with no luck. Can someone point me in the right direction?

Thanks,
Matt M.

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list