Hi, In our product, after user1 installs the MSI, user1 will remove the original MSI and then give the machine to user2. For example, the user1 installs the MSI from a remote share and user2 will have no access to the remote share. This will disable "repair through add/remove program" for user2 because he cannot get the original MSI. However, "repair through add/remove program" is a must for user2.
After reading MSDN<http://blogs.msdn.com/windows_installer_team/archive/2006/05/24/605835.aspx>, I decides to make "repair through add/remove program" use the cached MSI instead of the original MSI used to install. The cached MSI location is stored in this registry value HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\{SomeGuid}\InstallProperties\LocalPackage. The value is something like: c:\windows\installer\157efa1.msi. "S-1-5-18" = SID for LocalSystem and {SomeGuid} is the Package Guid. I don't know where the package guid is generated from but I observed that it is consistent across machines. Can I safely assume the guid is constant for my product? The AppWix.cpl picks the MSI path from LastUsedSource registry value and package name PackageName registry value from HKEY_CLASSES_ROOT\Installer\Products\{SomeGuid}\SourceList. So if I use the cached MSI's location and name to replace the LastUsedSource and PackageName respectively, I can repair through add/remove program without the original MSI. However, the downside is that everytime after I repair, the cached MSI's name changes (e.g. 157efa1.msi changes to 33ef.msi). This requires that I do the registry change everytime I repair to make "repair through add/remove program" always points to the lastest cached MSI. Are we on the right track? Is there any better/safer way to achieve "repair through add/remove program without original MSI"? Appreciate your help! Thanks Lian ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) 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/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users