[wix-users] URL shortcut using a specific browser
Marshall, Matthew M (DSHS/DCS)
marshmm at dshs.wa.gov
Wed Feb 15 17:18:29 PST 2017
I wanted to follow up and say thank you to everybody that chimed in. We were able to solve this problem using Shortcut instead. I know this was an unusual request, but required for our situation. I wanted to post the working solution for future reference.
<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>
<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=""/>
<Shortcut Directory="DesktopFolder" Id="ShortcutID"
Name="Shortcut" Description="shortcut to url"
Target="[CHROMEFOUND]chrome.exe"
Arguments="[MY_URL]"
Advertise="no"/>
<RemoveFolder Id="DesktopFolder" On="uninstall"/>
</Component>
</Directory>
</Directory>
<SetProperty Id="MY_URL" Value="https://website.gov/login " Sequence="execute" After="InstallInitialize"/>
To make this work, we had to pass in the MY_URL property as an argument.
Thank you again for the help.
Matt Marshall
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Phill Hogland
Sent: Monday, February 13, 2017 2:12 PM
To: wix-users at lists.wixtoolset.org
Subject: Re: [wix-users] URL shortcut using a specific browser
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/
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list