I assume your non-Wix setup is still an MSI.

The FindRelatedProducts action that uses the Upgrade table cannot detect
products installed for a different context. i.e. Your per-machine installer
can't see a per-user installer using Upgrade elements. You could use upgrade
elements to detect an existing per-machine installation but that'll mean
having 2 detection mechanisms for the same thing. Therefore you'll have to
use some kind of search, as you surmised, although this is trickier to get
right. 

The registry key for installed MSIs is at 
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Unin
stall\{product code guid} for 32-bit MSIs on 64-bit OS.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{produ
ct code guid} for 64-bit MSIs or 32-bit MSIs on 32-bit OS.

You'll have to take into account the bitness of the original and upgrade MSI
and the target OSes and you'll need to know the product codes of the MSIs
you're wanting to detect and create a registry search for each one.

Once you've done that, you'll have a bunch of properties from the
registrysearches that will be empty or not that you can test in the launch
condition, something like this

<Condition Message="Please remove existing products.">not (PRODUCT1DETECTED
or PRODUCT2DETECTED or PRODUCT3DETECTED)</Condition>

-----Original Message-----
From: Dirk Ziegelmeier [mailto:d...@ziegelmeier.net] 
Sent: 25 September 2012 07:07
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Detect perUser install from perMachine install
(Launchcondition)

Hello,

I'd like to author an MSI that shall upgrade an old (non-WiX) setup. The old
setup had an option where it could either be installed perMachine or perUser.
The new setup should be perMachine only, so I'd like to write a launch
condition that reads "Please uninstall old [Product] before installing the
new one" when an old perUser install is detected. I am aware that the launch
condition will only work for the user installing the setup, if another user
has installed the old setup, too, it will not be detected.
This limitation is acceptable.

My problem is that I'm unable to find an example for a RegistrySearch or
whatever which I need to detect the old perUser setup. Can someone point me
into the right direction?

Thank you in advance
Dirk
-----------------------------------------------------------------------------
-
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat
landscape has changed and how IT managers can respond. Discussions will
include endpoint security, mobile security and the latest in malware threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to