Good day.

I would like to archive the following behavior:
If installer is launched while the same product version already
intalled,then it does almost the same as pure install. That is:
allow user to select installation folder; allow user to select
whether to install desktop shortcut; change some texts in UI;
omit license agreement dialog;...

The problem is:
On the first ("pure") installation all looks OK. For example,
if I select checkbox "Install desktop shortcut" the shortcut
is installed; if I unselect the checkbox the shortcut is not
installed. However, if the installer launched over installed
version of the product, the shortcut is not installed if the
shortcut was not installed previously; and the shortcut is not
removed if the shortcut was installed previously.

In the wix code on the re-install I do the following:
1. Set REINSTALL to ALL and REINSTALLMODE to "amus".
2. Code for the shortcut looks like the following:
/---
<Directory Id="DesktopFolder" Name="Desktop">
</Component>
<Component Id="IdComp_DesktopIcon"
Guid="4518AC53-608C-4549-B17B-3EC426327E25">
<Condition>INSTALLDESKTOPSHORTCUT=1</Condition>
<RegistryKey Root="HKCU" Key="Software\Firm\Product" 
Action="createAndRemoveOnUninstall">
  <RegistryValue Type="string" Value="" KeyPath="yes" />
</RegistryKey>
<Shortcut Id="IdShortcut_DesktopMainExe" Name="Product"
WorkingDirectory="INSTALLDIR" Icon="IdIcon_Main.ico" 
Target="[!IdFile_MainExe]" Advertise="no" />
</Component>
</Directory>
---/

By the way. Is this normal to use the same KeyPath for some components?
For example the same registry values for DeskTop and Programs menu
shortcuts? MSDN says: "Two components cannot share the same
key path value". But compiling and verifying goes OK. And I did not
discover problems using the same keypaths.

Thanks.
Vitaly.


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to