What people often do is store APPLICATIONFOLDER to a registry value, and use a RegistrySearch to populate a secure property by the same name with it.
<Property Id="APPLICATIONFOLDER" Secure="yes"> <RegistrySearch Id="ApplicationFolderSearch" Type="raw" Root="..." Key="..." Name="InstallationPath"/> </Property> And inside of one of your components (or in a new component created for this purpose) <RegistryValue Id="ApplicationFolder" Root="..." Key="..." Name="InstallationPath" Type="string" Value="[APPLICATIONFOLDER]" /> If the registry key/value doesn't exist, the current logic is used to calculate the path. If the value does exist, the current logic is ignored and that path shows up in the UI as well as gets used for installation. -----Original Message----- From: Jiang, Chunyan (GE Healthcare) [mailto:chunyan.ji...@ge.com] Sent: Friday, October 02, 2009 6:26 AM To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] How to find the installed path for update Hi Wix-users, I have developed a wix installer. It is an updatable installation package. For the path, I set the default path as <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="APPLICATIONFOLDER" Name="ViewPoint6"> It will show "D:\ViewPoint6" as the default in InstallDirDlg.wxs: <Control Id="Folder" Type="PathEdit" X="20" Y="100" Width="320" Height="18" Property="WIXUI_INSTALLDIR" Indirect="yes" /> <Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONFOLDER" /> However, if I installed the software in the other path, like d:\testinatll for the first time. When there is new version avalable, I want to update it. The InstallDirDlg still shows the path as "D:\ViewPoint6", instead of "d:\testinatll". How can I get the path for the update installation and set it to InstallDirDlg? Probably, I need to have to dialogs, one for new installation, defaut path is "D:\ViewPoint6", the other one is update dialog, the path should be set as installed path. Best regards Chunyan ---------------------------------------------------------------------------- -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users