Hi: I wrote a MSI file to install my application. It can let user select install path through BrowseDlg. But once user changes the default install path, it cannot remove any file which the MSI has installed.
I checked the installation log file. I found that it cannot get the correct INSTALLDIR at the beginning of uninstall. The path it got still is the default value "c:\programe files\myappname" I found an awkward solution: write the INSTALLDIR to registry and read it when uninstalling. Is there any other better solution? A piece of wxs code looks like following: <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder" Name="PFiles"> <Directory Id="INSTALLDIR" Name="."> <Directory Id="MyApp" Name=" myappname "> < File ......... /> </Directory> </Directory> </Directory> </Directory> <Property Id='INSTALLDIR'> <RegistrySearch Id="PreviousInstallLocationRegistrySearch" Root="HKLM" Key="SOFTWARE\myappname" Name="InstallDir" Type="raw"/> </Property> Thanks. J A ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users