I have a situation where version 2.0 of our product was set up with an option
in the UI for user's to install at per-user or per-machine (bad design
flaw).  Now in the 3.0 version of our product it's per-machine by default. 
I've read that when toggling the ALLUSERS context in a major upgrade won't
work FindRelatedProducts.

So I've been playing around, and have wrapped 2 custom actions around the
FindRelatedProducts action.  The idea is to blank out the ALLUSERS property
at Sequence/@199, then revert it to per-machine at Sequence/@201, given
FindRelatedProducts is at Sequence/@200.

Something like this...

    <Property Id="24INSTALLPERUSER" Admin="yes" Secure="yes">
      <RegistrySearch Id="RegSearchFor24INSTALLPerUser" Root="HKCU"
Key="Software\Microsoft\Installer\Products\<guid string here>"
Name="ProductName" Type="raw" />
    </Property> 

    <CustomAction Id="ToggleALLUSERSToPerUser_ForFindRelatedProducts"
Property="ALLUSERS" Value=""/>
    <CustomAction Id="RevertALLUSERSToPerMachine_AfterFindRelatedProducts"
Property="ALLUSERS" Value="1"/>
    <InstallExecuteSequence>
      <Custom Action="ToggleALLUSERSToPerUser_ForFindRelatedProducts"
Sequence="199">24INSTALLPERUSER AND NOT Installed</Custom>
      <Custom Action="RevertALLUSERSToPerMachine_AfterFindRelatedProducts"
Sequence="201">24INSTALLPERUSER AND NOT Installed</Custom>
    </InstallExecuteSequence>
    <InstallUISequence>
      <Custom Action="ToggleALLUSERSToPerUser_ForFindRelatedProducts"
Sequence="199">24INSTALLPERUSER AND NOT Installed</Custom>
      <Custom Action="RevertALLUSERSToPerMachine_AfterFindRelatedProducts"
Sequence="201">24INSTALLPERUSER AND NOT Installed</Custom>
    </InstallUISequence>

Everything seems to work fine with the install, but I have further testing
scenarios to go through.  I just wanted to see if anyone else had some
knowledge on possible ways to get around this, and am also curious what
caveats might arise from using the 2 custom actions....

Thank you.
-- 
View this message in context: 
http://n2.nabble.com/major-upgrade-of-per-user-install-with-per-machine-install-tp4400848p4400848.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to