CA-110446: XenCenter Installation: multiple install on same OS when

selected installation for all users.

Changed XeCenter.wxs file (and updated XenCenter.l10n.diff accordingly) to
set ALLUSERS property when InstallDir key found in HKLM registry, i.e.
previous version of XenCenter was installed for "All users" (the
property is not set when previous version was installed for "Just me"). The
property is cleared after searching for related products is finished to
allow the user changing installation context in GUI.

Signed-off-by: Adrian Jachacy <Adrian.Jachacy@citrix.com>
This commit is contained in:
Adrian Jachacy 2013-07-02 12:36:41 +01:00
parent 39a9991118
commit c96da7ba38
2 changed files with 13 additions and 6 deletions

View File

@ -26,10 +26,10 @@
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE. # SUCH DAMAGE.
--- XenCenter.wxs 2013-07-01 11:22:14.744131100 +0100 --- XenCenter.wxs 2013-07-02 12:29:32.138358700 +0100
+++ XenCenter.l10n.wxs 2013-07-01 11:23:18.864542500 +0100 +++ XenCenter.l10n.wxs 2013-07-02 12:31:36.023746000 +0100
@@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
<?define UpgradeCode="{EA0EF50F-5CC6-452B-B09F-3F5EC564899D}"?> <?define UpgradeCode="{EA0EF50F-5CC6-452B-B09F-3F5EC564899D}"?>
<?define ProductCode="{65AE1345-A520-456D-8A19-2F52D43D3A09}"?> <?define ProductCode="{65AE1345-A520-456D-8A19-2F52D43D3A09}"?>
@ -173,6 +173,6 @@
<PropertyRef Id="NETFRAMEWORK35" /> <PropertyRef Id="NETFRAMEWORK35" />
- <Condition Message=".NET Framework 3.5 is required for this installation."><![CDATA[Installed OR NETFRAMEWORK35]]></Condition> - <Condition Message=".NET Framework 3.5 is required for this installation."><![CDATA[Installed OR NETFRAMEWORK35]]></Condition>
+ <Condition Message="!(loc.Required_For_Installation)"><![CDATA[Installed OR NETFRAMEWORK35]]></Condition> + <Condition Message="!(loc.Required_For_Installation)"><![CDATA[Installed OR NETFRAMEWORK35]]></Condition>
<InstallExecuteSequence> <Property Id="PERMACHINEINSTALL">
<AppSearch Sequence="50" /> <RegistrySearch Id="InstallRegistry" Type="raw" Root="HKLM" Key="Software\Citrix\XenCenter" Name="InstallDir" />
<FindRelatedProducts Before="LaunchConditions" /> </Property>

View File

@ -228,6 +228,11 @@
<MajorUpgrade AllowDowngrades="no" AllowSameVersionUpgrades="yes" DowngradeErrorMessage="!(loc.ErrorNewerProduct)" Schedule="afterInstallInitialize"/> <MajorUpgrade AllowDowngrades="no" AllowSameVersionUpgrades="yes" DowngradeErrorMessage="!(loc.ErrorNewerProduct)" Schedule="afterInstallInitialize"/>
<PropertyRef Id="NETFRAMEWORK35" /> <PropertyRef Id="NETFRAMEWORK35" />
<Condition Message=".NET Framework 3.5 is required for this installation."><![CDATA[Installed OR NETFRAMEWORK35]]></Condition> <Condition Message=".NET Framework 3.5 is required for this installation."><![CDATA[Installed OR NETFRAMEWORK35]]></Condition>
<Property Id="PERMACHINEINSTALL">
<RegistrySearch Id="InstallRegistry" Type="raw" Root="HKLM" Key="Software\Citrix\XenCenter" Name="InstallDir" />
</Property>
<CustomAction Id="ClearAllUsers" Property="ALLUSERS" Value="" />
<CustomAction Id="SetAllUsers" Property="ALLUSERS" Value="1" />
<InstallExecuteSequence> <InstallExecuteSequence>
<AppSearch Sequence="50" /> <AppSearch Sequence="50" />
<FindRelatedProducts Before="LaunchConditions" /> <FindRelatedProducts Before="LaunchConditions" />
@ -254,7 +259,9 @@
<InstallFinalize Sequence="6600" /> <InstallFinalize Sequence="6600" />
</InstallExecuteSequence> </InstallExecuteSequence>
<InstallUISequence> <InstallUISequence>
<Custom Action="SetAllUsers" Before="FindRelatedProducts">NOT Installed AND PERMACHINEINSTALL</Custom>
<FindRelatedProducts Before="LaunchConditions" /> <FindRelatedProducts Before="LaunchConditions" />
<Custom Action="ClearAllUsers" After="FindRelatedProducts">NOT Installed AND PERMACHINEINSTALL</Custom>
<ExecuteAction Sequence="1102" /> <ExecuteAction Sequence="1102" />
</InstallUISequence> </InstallUISequence>
<Icon Id="XenCenterICO" SourceFile="..\XenAdmin\AppIcon.ico" /> <Icon Id="XenCenterICO" SourceFile="..\XenAdmin\AppIcon.ico" />