Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wix - shortcut icon for website

I'm new on wix. In need to create a shortcut to a local website.

It works fine and creates the shorcuts, but it doesn't show any icon on start menu and desktop... The website has favicon file and when I open the site I can see it perfectly - I just don't see it in the shortcut. I tried to google it but I didn't find a good answer for util:InternetShortcut..

My code is:

<DirectoryRef Id="ApplicationProgramsFolder">
  <Component Id="ApplicationShortcutBBBApp" Guid="---">
    <util:InternetShortcut Id="ApplicationStartMenuShortcutBBBApp"
                    Name="BBB"
                    Target="http://localhost/BBB"/>
    <util:InternetShortcut Id="ApplicationDesktopShortcutBBBApp"
                    Name="BBB"
                    Directory="DesktopFolder"
                    Target="http://localhost/BBB"/>
    <RegistryValue Root="HKCU" Key="Software\Microsoft\BBB" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
  </Component>
</DirectoryRef>
like image 500
TamarG Avatar asked Jun 21 '12 13:06

TamarG


2 Answers

There is an easier solution for that problem. Instead of using InternetShortcut, you can just use the normal Shortcut and use a trick to set the target being a url.

<SetProperty Id="URL" Value="http://yourpage.com" Sequence="execute"  Before="CreateShortcuts" />


<Shortcut Directory="DesktopFolder" Id="WebShortcut" Name="Your Page" Description="Your Page Description" Target="[URL]" Icon="IconDesktop">
    <Icon Id="IconDesktop" SourceFile="images\icon.ico" />
</Shortcut>

"SetProperty" can be placed somewhere in your Product tag. "Shortcut" should be placed instead of "InternetShortcut". It is important to have the property [URL] as a Target. As a Property it can be an url. Diretctly written it doese not work. There might be warnings in heat/candle/light, they can be ignored.

like image 53
Squishi Avatar answered Nov 10 '22 13:11

Squishi


InternetShortcut doesn't support specifying an icon like a normal Shortcut. There's an open feature request for that. Technically, IUniformResourceLocator shortcuts in Windows don't support icons, though IShellLink shortcuts do.

like image 24
Bob Arnson Avatar answered Nov 10 '22 13:11

Bob Arnson