Hello,

I have an installer version 1.0.0 released as per-user installation, and in
version 2.0.0(and after) I need to do per-machine installation.
When doing upgrade from 1.0.0 to 2.0.0 installation, it has problems that
the previous one cannot be uninstalled.
Finally I find msi cannot support upgrade cross install context. 
So I change intsaller 2.0.0 as follows:
*case1*. New Install 2.0.0: Cannot detect per-machine flag in HKLM and find
2.0.0 is a new installtion, so cheng ALLUSERS to 1 and do pre-machine
install, and write pre-machine flag in HKLM.
*case2*. Upgrade from 1.0.0 to 2.0.0: If 1.0.0 is installed and user wants
to upgrade to 2.0.0, installers detect registry in HKLM and find no
per-machine falg(because after 2.0.0 this flag is written to HKLM), so
change ALLUSERS to "" and do per-user install.
*case3*. Upgrade from 2.0.0 to 3.0.0:If users installs newer version 3.0.0
in future, install detects per-machine flag in HKLM. If there is per-machine
flag, do per-machine install, and if there is no flag, do per-user install.

After these changes, I can handle the case1 and case2.
But I still get issue in case3 that 2.0.0 is not uninstalled.
I analyze the log and find 3.0.0 is per-user install and skip uninstall
2.0.0 in "FindRelatedProducts".
The property ALLUSERS is changed after seraching the registry in
"AppSearch". But "FindRelatedProducts" is before "AppSearch", that means
before "AppSearch" 3.0.0 is per-user, so it skip 2.0.0 uninstall. After
"AppSearch", 3.0.0 does per-machine installation.

log of upgrade from 2.0.0 to 3.0.0:

/ MSI (c) (4C:38) [09:58:38:093]: FindRelatedProducts: current install is
per-user.  Related install for product '{OLD-PRODUCT-UID}' is per-machine. 
Skipping... /

*So my question is how can perform installation per-user or per-machine by
detecting previous installation context?*




--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-perform-installation-per-user-or-per-machine-by-detecting-previous-installation-context-tp7584581.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to