The shortcut is part of your installation so I cant think of a way to
stop it being put back. The best option might be to ask the users if
they want to create it in the installation UI and add a component
condition to the shortcut component based on their response. 

-----Original Message-----
From: Scott Palmer [mailto:[email protected]] 
Sent: 11 August 2009 15:33
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] How to make a User deletable desktop shortcut that
isinstalled for all users.

Our product places some commonly accessed documents in "C:\Documents and
Settings\All Users\Documents\CompanyName\ProductName" using <Directory
Id="WIX_DIR_COMMON_DOCUMENTS">
  <Directory Id="CompanyDocs" Name="CompanyName">
    <Directory Id="ProductDocs" Name="ProductName">

... blah...

Since on XP (the most common OS for our customers) that path is a royal
pain to navigate to, we install a shortcut on the desktop to our
documents:

<Directory Id="WIX_DIR_COMMON_DOCUMENTS">
  <Directory Id="CompanyDocs" Name="CompanyName">
    <Directory Id="ProductDocs" Name="ProductName">

<Component Id="ProductDocsShortcutCmp" Guid="{some_guid_here}">
              <Shortcut Id="StreamDocsShortcut"  Advertise="no"
Description="Shortcut to ProductName Documents" Name="ProductName
Documents"
Directory="DesktopFolder" />
              <RegistryValue KeyPath="yes" Id="documentsShortcut"
Action="write" Root="HKCU"
Key="Software\CompanyName\ProductName\documentsShortcut" Name="MSIHACK"
Type="string" Value="1"/>
              <RemoveRegistryKey Action="removeOnUninstall" Root="HKCU"
Key="Software\CompanyName\ ProductName\documentsShortcut"/>
            </Component>


However, using this method, if a user wants to remove the shortcut from
their desktop (because they like an un-cluttered desktop) MSI
automatically "repairs" the component and puts the shortcut back.

How can I solve this problem so individual users are free to delete the
shortcut if they don't want it and still install the shortcut for
ALLUSERS ?

Thanks in advance..

Scott
------------------------------------------------------------------------
------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day trial. Simplify your report design, integration and deployment -
and focus on what you do best, core application coding. Discover what's
new with Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users

SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.  
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to