Note that there are some explanatory texts on larger screens.

plurals
  1. POCreate a Desktop Shortcut to an existing FOLDER using WiX
    primarykey
    data
    text
    <p>I have the need to create a Desktop Shortcut to an existing FOLDER (NOT to a file) using Wix. To elaborate more, my installer program has a CustomAction program written using C# associated with it. This CustomAction program creates a folder named "BSS" of which the path is selected by user. </p> <p>C:\ProgramData\MT\BSS</p> <p>Now I need to place a Desktop Shortcut to this folder using WiX. However, I encounter a problem since this folder does not have a folder structure within WiX. The closest code I could find was the following.</p> <pre><code>&lt;Directory Id="DesktopFolder" Name="Desktop"/&gt; &lt;Directory Id="CommonAppDataFolder" Name="ProgramDataFolder"/&gt; &lt;Component Id="ComponentBSStrageShortcut" Guid="{8436995c-2e76-4030-b92d-c6b4bc243c43}"&gt; &lt;Shortcut Id="ShortcutBSStrageShortcut" Directory="DesktopFolder" WorkingDirectory="APPLICATIONFOLDER" Target="[CommonAppDataFolder]/MTK/BSStrage" Name="BSStrage" Show="normal"/&gt; &lt;RegistryValue Action="write" Key="SOFTWARE/MTK/BackStreet" Root="HKCU" Type="string" KeyPath="yes" Value="ApplicationFolderName"/&gt; &lt;/Component&gt; </code></pre> <p>When I build the installer this way, it actually creates a shortcut on Desktop. However, WiX seems to think that BSStrage is a file/application so it places a shortcut to an imaginary application called BSStrage in the location C:\ProgramData\MT. But double clicking on it dosen't help as there is no program that can be used to open it.</p> <p>Obviously I'm doing it wrong here. Can someone please help me with this, so as how to overcome this problem. Note that I'm extremely new to Wix (it's been only two days) and has never worked with it before. Any code sample would be of great help.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload