The way I accomplished this was to store the install path in the registry and then do a registry search to find out where the previous version was installed. I believe the same thing could be accomplished with a file search.
<Property Id="DIRFOO"> <RegistrySearch Id="FooPath" Type="directory" Root="HKLM" Key="SOFTWARE\Acme\Foo" Name="Install Path"></RegistrySearch> </Property> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="DIRFOO" Name="foo"> <Component Id="FooPath" Guid="C4F13748-9DA4-4e5d-8128-3AAC5EF25F7E"> <RegistryKey Root="HKLM" Key="SOFTWARE\Acme\Foo" Action="createAndRemoveOnUninstall"> <RegistryValue Type="string" Name="Install Path" Value="[DIRFOO]"></RegistryValue> </RegistryKey> </Component> </Directory> </Directory> Mike -----Original Message----- From: Jiang, Chunyan (GE Healthcare) [mailto:chunyan.ji...@ge.com] Sent: Friday, October 02, 2009 8: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