summaryrefslogtreecommitdiff
path: root/src/mongo/installer/msi/wxs
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2017-12-11 14:41:32 -0500
committerMark Benvenuto <mark.benvenuto@mongodb.com>2017-12-11 14:41:32 -0500
commit2ea580cd77382a841c7cd6c8097cfd3d195698f0 (patch)
tree19f937384b2bb0ae0157ae42b41b1db8760237c9 /src/mongo/installer/msi/wxs
parent06b3488461d820c9081e5d7fca0fc028470922ea (diff)
downloadmongo-2ea580cd77382a841c7cd6c8097cfd3d195698f0.tar.gz
SERVER-14263 Install MongoDB as service on Windows
Diffstat (limited to 'src/mongo/installer/msi/wxs')
-rw-r--r--src/mongo/installer/msi/wxs/BinaryFragment.wxs46
-rw-r--r--src/mongo/installer/msi/wxs/FeatureFragment.wxs20
-rw-r--r--src/mongo/installer/msi/wxs/Installer_64.wxs151
-rw-r--r--src/mongo/installer/msi/wxs/UIFragment.wxs123
4 files changed, 300 insertions, 40 deletions
diff --git a/src/mongo/installer/msi/wxs/BinaryFragment.wxs b/src/mongo/installer/msi/wxs/BinaryFragment.wxs
index bfc4d8fd2d2..da6fd4260e0 100644
--- a/src/mongo/installer/msi/wxs/BinaryFragment.wxs
+++ b/src/mongo/installer/msi/wxs/BinaryFragment.wxs
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Fragment>
<DirectoryRef Id="BIN">
<Component Id="c_bsondump" Guid="DEEA45CA-5175-453B-9D0B-6168B4C0C891">
@@ -17,10 +17,40 @@
<File Id="f_mongod" Name="mongod.exe" Source="$(var.BinarySource)\mongod.exe"
DiskId ="1" KeyPath="yes"/>
</Component>
+ <Component Id="c_mongodWithService" Guid="1E7C89DA-4B96-41E2-8106-DDBA64631249">
+ <File Id="f_mongodWithService" Name="mongod.exe" Source="$(var.BinarySource)\mongod.exe"
+ DiskId ="1" KeyPath="yes"/>
+ <ServiceInstall Id='MyServiceInstall'
+ Description="MongoDB Database Server"
+ Arguments='--config "[BIN]mongod.cfg" --service'
+ DisplayName='MongoDB Server'
+ Name='MongoDB'
+ ErrorControl='normal'
+ Start='auto'
+ Type='ownProcess'
+ Account='[MONGO_SERVICE_FULL_ACCOUNT_NAME]'
+ Password='[MONGO_SERVICE_ACCOUNT_PASSWORD]'
+ Vital='yes' />
+ <ServiceControl Id="StartStopService" Name="MongoDB" Start="install" Stop="both" Remove="uninstall" Wait="no" />
+ </Component>
+ <Component Id="c_mongodWithServiceUser" Guid="961B0579-4074-4437-B168-9B6C5E3C9E6A" KeyPath="yes">
+ <Condition><![CDATA[MONGO_SERVICE_INSTALL AND MONGO_SERVICE_ACCOUNT_TYPE <> "ServiceLocalNetwork"]]></Condition>
+ <util:User Id="GrantLogonAsService"
+ Name="[MONGO_SERVICE_ACCOUNT_NAME]"
+ Domain="[MONGO_SERVICE_ACCOUNT_DOMAIN_GRANT]"
+ CreateUser="no" LogonAsService="yes" UpdateIfExists="yes" FailIfExists="no" >
+ <!-- Grant membership to performance counter group so FTDC is happy -->
+ <util:GroupRef Id="PerfmonGroup" />
+ </util:User>
+ </Component>
<Component Id="c_mongodPdb" Guid="8B41A2E2-911C-4399-8E9F-D3C1AD3B9EDD">
<File Id="f_mongodPdb" Name="mongod.pdb" Source="$(var.BinarySource)\mongod.pdb"
DiskId ="1" KeyPath="yes"/>
</Component>
+ <Component Id="c_mongodCfg" Guid="EA715A4C-7C63-4C5C-8F73-A82E84668AEE">
+ <File Id="f_mongodCfg" Name="mongod.cfg" Source="$(var.ProjectDir)mongod.yaml"
+ DiskId ="1" KeyPath="yes"/>
+ </Component>
<Component Id="c_mongodump" Guid="FFE32884-ACAD-4EC6-AF84-6BC94F55819E">
<File Id="f_mongodump" Name="mongodump.exe" Source="$(var.ToolBinarySource)\mongodump.exe"
DiskId ="1" KeyPath="yes"/>
@@ -122,6 +152,20 @@
</Component>
</DirectoryRef>
<?endif ?>
+ <DirectoryRef Id="MONGO_DATA_PATH" >
+ <Component Id="c_MONGO_DATA_PATH" Guid="F695F048-E262-4871-A31B-0E2361BB4BCB">
+ <CreateFolder Directory="MONGO_DATA_PATH" >
+ <util:PermissionEx User="[MONGO_SERVICE_ACCOUNT_NAME]" GenericAll="yes"/>
+ </CreateFolder>
+ </Component>
+ </DirectoryRef>
+ <DirectoryRef Id="MONGO_LOG_PATH" >
+ <Component Id="c_MONGO_LOG_PATH" Guid="D7DBC821-5BD2-4EB7-AEFB-7AC92945146D">
+ <CreateFolder Directory="MONGO_LOG_PATH" >
+ <util:PermissionEx User="[MONGO_SERVICE_ACCOUNT_NAME]" GenericAll="yes"/>
+ </CreateFolder>
+ </Component>
+ </DirectoryRef>
<?if $(var.Edition) = Enterprise or $(var.Edition) = SSL ?>
diff --git a/src/mongo/installer/msi/wxs/FeatureFragment.wxs b/src/mongo/installer/msi/wxs/FeatureFragment.wxs
index 69e1c8f0db5..64506d015a1 100644
--- a/src/mongo/installer/msi/wxs/FeatureFragment.wxs
+++ b/src/mongo/installer/msi/wxs/FeatureFragment.wxs
@@ -20,8 +20,9 @@
Title ="Server"
Description="The MongoDB server (mongod)"
Level ="1">
- <ComponentRef Id="c_mongod"/>
<ComponentRef Id="c_mongodPdb"/>
+ <ComponentRef Id="c_mongodCfg"/>
+
<?if $(var.Edition) = Enterprise ?>
<ComponentGroupRef Id="cg_EnterpriseServer" />
<?endif ?>
@@ -29,6 +30,23 @@
<ComponentGroupRef Id="cg_SSLBase" />
<?endif ?>
</Feature>
+ <Feature Id="ServerNoService"
+ Title ="ServerNoService"
+ Description="The MongoDB server (mongod)"
+ Display="hidden"
+ Level ="32767">
+ <ComponentRef Id="c_mongod"/>
+ </Feature>
+ <Feature Id="ServerService"
+ Title ="ServerService"
+ Description="The MongoDB server (mongod)"
+ Display="hidden"
+ Level ="32767">
+ <ComponentRef Id="c_mongodWithService"/>
+ <ComponentRef Id="c_mongodWithServiceUser" />
+ <ComponentRef Id="c_MONGO_DATA_PATH"/>
+ <ComponentRef Id="c_MONGO_LOG_PATH"/>
+ </Feature>
<Feature Id="Client"
Title ="Client"
Description="The MongoDB client/shell (mongo)"
diff --git a/src/mongo/installer/msi/wxs/Installer_64.wxs b/src/mongo/installer/msi/wxs/Installer_64.wxs
index f79c9c3aaf1..0a62dff6e43 100644
--- a/src/mongo/installer/msi/wxs/Installer_64.wxs
+++ b/src/mongo/installer/msi/wxs/Installer_64.wxs
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <Product Id="$(var.ProductId)"
- Name="!(wix.ProductName)"
- Language="1033"
- Version="$(var.MongoDBVersion)"
- Manufacturer="MongoDB"
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
+ xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
+ <Product Id="$(var.ProductId)"
+ Name="!(wix.ProductName)"
+ Language="1033"
+ Version="$(var.MongoDBVersion)"
+ Manufacturer="MongoDB"
UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="405" Compressed="yes" Platform="x64"/>
@@ -12,48 +13,77 @@
<WixVariable Id="InstallFolder" Value="$(var.MongoDBMajorVersion)"/>
<?if $(var.Edition) = Enterprise ?>
- <WixVariable Id="ProductName" Value="MongoDB $(var.MongoDBVersion) $(var.Flavor) Enterprise (64 bit)" />
- <WixVariable Id="ProductMajorName" Value="MongoDB $(var.MongoDBMajorVersion) $(var.Flavor) Enterprise (64 bit)" />
+ <WixVariable Id="ProductName" Value="MongoDB $(var.MongoDBVersion) $(var.Flavor) Enterprise (64 bit)" />
+ <WixVariable Id="ProductMajorName" Value="MongoDB $(var.MongoDBMajorVersion) $(var.Flavor) Enterprise (64 bit)" />
<?elseif $(var.Edition) = SSL ?>
- <WixVariable Id="ProductName" Value="MongoDB $(var.MongoDBVersion) $(var.Flavor) SSL (64 bit)" />
- <WixVariable Id="ProductMajorName" Value="MongoDB $(var.MongoDBMajorVersion) $(var.Flavor) SSL (64 bit)" />
+ <WixVariable Id="ProductName" Value="MongoDB $(var.MongoDBVersion) $(var.Flavor) SSL (64 bit)" />
+ <WixVariable Id="ProductMajorName" Value="MongoDB $(var.MongoDBMajorVersion) $(var.Flavor) SSL (64 bit)" />
<?else?>
- <WixVariable Id="ProductName" Value="MongoDB $(var.MongoDBVersion) $(var.Flavor) (64 bit)" />
- <WixVariable Id="ProductMajorName" Value="MongoDB $(var.MongoDBMajorVersion) $(var.Flavor) (64 bit)" />
+ <WixVariable Id="ProductName" Value="MongoDB $(var.MongoDBVersion) $(var.Flavor) (64 bit)" />
+ <WixVariable Id="ProductMajorName" Value="MongoDB $(var.MongoDBMajorVersion) $(var.Flavor) (64 bit)" />
<?endif?>
<MajorUpgrade
- DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."/>
+ DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."/>
<Directory Id="TARGETDIR" Name="SourceDir">
- <Directory Id="ProgramFiles64Folder">
- <Directory Id="MongoDB" Name="MongoDB">
- <Directory Id="Server" Name="Server">
- <Directory Id="INSTALLLOCATION" Name="!(wix.InstallFolder)">
- <Directory Id="BIN" Name="bin" />
- <Directory Id="SNMP" Name="snmp" />
+ <Directory Id="ProgramFiles64Folder">
+ <Directory Id="MongoDB" Name="MongoDB">
+ <Directory Id="Server" Name="Server">
+ <Directory Id="INSTALLLOCATION" Name="!(wix.InstallFolder)">
+ <Directory Id="BIN" Name="bin" />
+ <Directory Id="MONGO_DATA_PATH" Name="data" />
+ <Directory Id="MONGO_LOG_PATH" Name="log" />
+ <Directory Id="SNMP" Name="snmp" />
+ </Directory>
+ </Directory>
+ </Directory>
+ </Directory>
+ <Directory Id="CommonAppDataFolder">
+ <Directory Id="MongoDBData" Name="MongoDB">
+ <Directory Id="ServerData" Name="Server">
+ <Directory Id="VersionData" Name="!(wix.InstallFolder)" />
+ </Directory>
</Directory>
- </Directory>
</Directory>
- </Directory>
</Directory>
+ <Binary Id="CAIntro" SourceFile="$(var.CustomActionDll)"/>
+
+ <CustomAction Id="UpdateMongoYAML"
+ BinaryKey="CAIntro"
+ DllEntry="UpdateMongoYAML"
+ Execute="deferred"
+ Return="check"
+ HideTarget="no" />
+
+ <CustomAction Id="UpdateMongoYAML.SetProperty"
+ Return="check"
+ Property="UpdateMongoYAML"
+ Value="BIN=[BIN];MONGO_DATA_PATH=[MONGO_DATA_PATH];MONGO_LOG_PATH=[MONGO_LOG_PATH]"/>
+
+ <CustomAction Id="ValidateServiceLogon"
+ BinaryKey="CAIntro"
+ DllEntry="ValidateServiceLogon"
+ Execute="immediate" />
+
+ <InstallExecuteSequence>
+ <Custom Action="UpdateMongoYAML.SetProperty" Before="InstallFiles" />
+ <Custom Action="UpdateMongoYAML" After="InstallFiles">MONGO_SERVICE_INSTALL AND NOT REMOVE</Custom>
+ </InstallExecuteSequence>
+
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<WixVariable Id="WixUIDialogBmp" Value="$(var.ProjectDir)Dialog.bmp" />
<WixVariable Id="WixUIBannerBmp" Value="$(var.ProjectDir)Banner.bmp" />
<WixVariable Id="WixUIInfoIco" Value="$(var.ProjectDir)Installer_Icon_32x32.ico" />
<WixVariable Id="WixUIExclamationIco" Value="$(var.ProjectDir)Installer_Icon_32x32.ico" />
- <!--
- <WixVariable Id="WixUINewIco" Value="Installer_Icon_16x16.ico" />
- <WixVariable Id="WixUIUpIco" Value="Installer_Icon_16x16.ico" />
- More information can be found at http://wix.tramontana.co.hu/tutorial/user-interface/ui-wizardry
- -->
<Property Id="ARPPRODUCTICON" Value="MongoDBIcon" />
<Property Id="ARPHELPLINK" Value="http://www.mongodb.org/" />
<Property Id="ARPURLINFOABOUT" Value="http://www.mongodb.org/" />
<Icon Id="MongoDBIcon" SourceFile="$(var.ProjectDir)Installer_Icon_32x32.ico" />
+ <Binary Id="MongoDBIconBinary" SourceFile="$(var.ProjectDir)Installer_Icon_32x32.ico" />
<FeatureGroupRef Id="fg_MongoDBAll" />
@@ -61,16 +91,72 @@
<UIRef Id="WixUI_ErrorProgressText" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
+ <!-- Settings for Install MongoDB as a service -->
+ <Property Id="MONGO_SERVICE_INSTALL" Value="0" Secure="yes" />
+ <Property Id="MONGO_SERVICE_ACCOUNT_TYPE" Secure="yes" Value="ServiceLocalNetwork" />
+ <Property Id="MONGO_SERVICE_NAME" Secure="yes" Value="MongoDB" />
+ <Property Id="MONGO_SERVICE_ACCOUNT_DOMAIN" Value="." />
+ <Property Id="MONGO_SERVICE_ACCOUNT_NAME" Secure="yes" Value="MongoDB" />
+ <Property Id="MONGO_SERVICE_ACCOUNT_PASSWORD" Secure="yes" Hidden="yes"/>
+
+ <Property Id="MONGO_DATA_PATH" Secure="yes" />
+ <Property Id="MONGO_LOG_PATH" Secure="yes" />
+
+ <util:Group Id="PerfmonGroup" Name="Performance Monitor Users" />
+
+ <!--
+ Setup the domain to use for granting permissions, the gotcha is the local machine.
+ The util:User element wants an empty string for the domain for the local machine.
+ The ServiceInstall element wants '.' for the domain for the local machine.
+ -->
+ <!-- Default the domain to grant to the user request -->
+ <CustomAction Id="MongoDB.SetGrantAccountDefault"
+ Property="MONGO_SERVICE_ACCOUNT_DOMAIN_GRANT" Value="[MONGO_SERVICE_ACCOUNT_DOMAIN]" />
+
+ <!-- Change the domain to blank if the user specified '.' i.e. local machine -->
+ <CustomAction Id="MongoDB.SetGrantAccountToBlank"
+ Property="MONGO_SERVICE_ACCOUNT_DOMAIN_GRANT" Value="" />
+
+ <!-- Change the domain to blank if the user specified '.' i.e. local machine -->
+ <CustomAction Id="MongoDB.SetGrantAccountToNetworkAccount"
+ Property="MONGO_SERVICE_ACCOUNT_DOMAIN_GRANT" Value="NT AUTHORITY" />
+
+ <!-- Default to the fully qualified domain\account for the service account -->
+ <CustomAction Id="MongoDB.SetServiceAccountDefault"
+ Property="MONGO_SERVICE_FULL_ACCOUNT_NAME"
+ Value="[MONGO_SERVICE_ACCOUNT_DOMAIN]\[MONGO_SERVICE_ACCOUNT_NAME]" />
+
+ <!-- Default to .\account if the user left domain blank -->
+ <CustomAction Id="MongoDB.SetServiceAccountToDot"
+ Property="MONGO_SERVICE_FULL_ACCOUNT_NAME" Value=".\[MONGO_SERVICE_ACCOUNT_NAME]" />
+
+ <!-- If the user chose network service, then just set the user account to Network Service -->
+ <CustomAction Id="MongoDB.SetServiceNetworkAccount"
+ Property="MONGO_SERVICE_FULL_ACCOUNT_NAME" Value="NT AUTHORITY\NetworkService" />
+ <CustomAction Id="MongoDB.SetServiceNetworkAccount2"
+ Property="MONGO_SERVICE_ACCOUNT_NAME" Value="NetworkService" />
+
+ <InstallExecuteSequence>
+ <Custom Action="MongoDB.SetGrantAccountDefault" After="CostFinalize" />
+ <Custom Action="MongoDB.SetGrantAccountToBlank" After="CostFinalize">MONGO_SERVICE_ACCOUNT_DOMAIN = "."</Custom>
+ <Custom Action="MongoDB.SetGrantAccountToNetworkAccount" After="CostFinalize">MONGO_SERVICE_ACCOUNT_TYPE = "ServiceLocalNetwork"</Custom>
+
+ <Custom Action="MongoDB.SetServiceAccountDefault" After="CostFinalize" />
+ <Custom Action="MongoDB.SetServiceAccountToDot" After="CostFinalize">MONGO_SERVICE_ACCOUNT_DOMAIN = ""</Custom>
+ <Custom Action="MongoDB.SetServiceNetworkAccount" After="CostFinalize">MONGO_SERVICE_ACCOUNT_TYPE = "ServiceLocalNetwork"</Custom>
+ <Custom Action="MongoDB.SetServiceNetworkAccount2" After="CostFinalize">MONGO_SERVICE_ACCOUNT_TYPE = "ServiceLocalNetwork"</Custom>
+ </InstallExecuteSequence>
+
<Property Id="MONGO_MULTIPLE_SKU" >
- <RegistrySearch Id="Mongo_Multiple_Sku"
- Root="HKLM"
- Key="Software\MongoDB\Server\$(var.MongoDBMajorVersion)"
- Name="Edition"
- Type="raw" />
+ <RegistrySearch Id="Mongo_Multiple_Sku"
+ Root="HKLM"
+ Key="Software\MongoDB\Server\$(var.MongoDBMajorVersion)"
+ Name="Edition"
+ Type="raw" />
</Property>
<Condition Message="You cannot install multiple editions for the same version of MongoDB. Already installed product '[MONGO_MULTIPLE_SKU]' conflicts with this product.">
- Installed OR (NOT MONGO_MULTIPLE_SKU OR MONGO_MULTIPLE_SKU = "!(wix.ProductMajorName)")
+ Installed OR (NOT MONGO_MULTIPLE_SKU OR MONGO_MULTIPLE_SKU = "!(wix.ProductMajorName)")
</Condition>
<Property Id="SHOULD_INSTALL_COMPASS" Secure="yes" Value="1" />
@@ -115,5 +201,6 @@
(NOT Installed) AND (SHOULD_INSTALL_COMPASS = 1)
</Custom>
</InstallExecuteSequence>
+
</Product>
</Wix>
diff --git a/src/mongo/installer/msi/wxs/UIFragment.wxs b/src/mongo/installer/msi/wxs/UIFragment.wxs
index 779109f9a72..15ca9172a80 100644
--- a/src/mongo/installer/msi/wxs/UIFragment.wxs
+++ b/src/mongo/installer/msi/wxs/UIFragment.wxs
@@ -7,14 +7,14 @@
<Publish Event="NewDialog" Value="MongoSetupTypeDlg" Dialog="LicenseAgreementDlg" Control="Next">LicenseAccepted = "1"</Publish>
<Publish Event="NewDialog" Value="MongoSetupTypeDlg" Dialog="CustomizeDlg" Control="Back">WixUI_InstallMode = "InstallCustom"</Publish>
- <Publish Event="NewDialog" Value="CompassDlg" Dialog="CustomizeDlg" Control="Next"></Publish>
- <Publish Event="NewDialog" Value="CompassDlg" Dialog="VerifyReadyDlg" Control="Back"></Publish>
+ <Publish Event="NewDialog" Value="ServiceDlg" Dialog="CustomizeDlg" Control="Next"></Publish>
+ <Publish Event="NewDialog" Value="ServiceDlg" Dialog="VerifyReadyDlg" Control="Back"></Publish>
<!-- A custom setup type dialog box with only Complete and Custom buttons -->
<Dialog Id="MongoSetupTypeDlg" X="50" Y="50" Width="370" Height="270" Title="[ProductName] Setup">
<Control Id="CompleteButton" Type="PushButton" X="40" Y="65" Width="80" Height="17" Text="C&amp;omplete" ToolTip="Complete Installation" TabSkip="no" Default="yes">
<Publish Property="WixUI_InstallMode" Value="InstallComplete">1</Publish>
- <Publish Event="NewDialog" Value="CompassDlg">1</Publish>
+ <Publish Event="NewDialog" Value="ServiceDlg">1</Publish>
<Publish Event="SetInstallLevel" Value="1000">1</Publish>
</Control>
<Control Id="CustomButton" Type="PushButton" X="40" Y="118" Width="80" Height="17" Text="C&amp;ustom" ToolTip="Custom Installation" TabSkip="no">
@@ -37,6 +37,117 @@
<Control Id="CustomText" Type="Text" X="60" Y="138" Width="280" Height="30" Text="Allows users to choose which program features will be installed and where they will be installed. Recommended for advanced users." TabSkip="yes" />
</Dialog>
+ <!-- A custom dialog box to warn the user about an invalid service logon. -->
+ <Dialog Id="InvalidServiceAccount" Width="260" Height="85" Title="[ProductName] Error" NoMinimize="yes">
+ <Control Id="Icon" Type="Icon" X="15" Y="15" Width="24" Height="24" ToolTip="Information icon" FixedSize="yes" IconSize="32" Text="MongoDBIconBinary" />
+ <Control Id="Return" Type="PushButton" X="100" Y="57" Width="56" Height="17" Default="yes" Cancel="yes" Text="&amp;Return">
+ <Publish Event="EndDialog" Value="Return">1</Publish>
+ </Control>
+ <Control Id="Text" Type="Text" X="48" Y="15" Width="194" Height="30" TabSkip="no">
+ <Text>The domain, user name and/or password are incorrect. Remember to use "." for the domain if the account is on the local machine.</Text>
+ </Control>
+ </Dialog>
+
+ <!-- A custom dialog box to configure a Windows service -->
+ <Dialog Id="ServiceDlg" X="50" Y="50" Width="370" Height="270" Title="[ProductName] Service Customization">
+ <Control Id="textTitle" Type="Text" X="8" Y="8" Width="122" Height="15" TabSkip="yes" Transparent="yes">
+ <Text>{\WixUI_Font_Title}Service Configuration</Text>
+ </Control>
+ <Control Id="textDescription" Type="Text" X="23" Y="23" Width="345" Height="10" TabSkip="yes" Transparent="yes">
+ <Text>Specify optional settings to configure MongoDB as a service.</Text>
+ </Control>
+ <Control Id="lineTopDivider" Type="Line" X="0" Y="44" Width="370" Height="2" />
+ <Control Id="lineBottomDivider" Type="Line" X="0" Y="234" Width="370" Height="2" />
+ <Control Id="Back" Type="PushButton" X="189" Y="244" Width="56" Height="17" TabSkip="no">
+ <Text>&lt; &amp;Back</Text>
+ <Publish Event="NewDialog" Value="MongoSetupTypeDlg" Order="1">WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete"</Publish>
+ <Publish Event="NewDialog" Value="CustomizeDlg" Order="2">WixUI_InstallMode = "InstallCustom"</Publish>
+ </Control>
+ <Control Id="Next" Type="PushButton" X="244" Y="244" Width="56" Height="17" TabSkip="no">
+ <Text>&amp;Next &gt;</Text>
+ <Publish Event="AddLocal" Value="ServerNoService">NOT MONGO_SERVICE_INSTALL</Publish>
+ <Publish Event="AddLocal" Value="ServerService">MONGO_SERVICE_INSTALL</Publish>
+ <Publish Event="DoAction" Value="ValidateServiceLogon" Order="1"><![CDATA[MONGO_SERVICE_INSTALL AND MONGO_SERVICE_ACCOUNT_TYPE <> "ServiceLocalNetwork"]]></Publish>
+ <Publish Event="SpawnDialog" Value="InvalidServiceAccount" Order="2">MONGO_SERVICE_ACCOUNT_VALID = "0"</Publish>
+ <Publish Event="NewDialog" Value="CompassDlg" Order="2">NOT MONGO_SERVICE_INSTALL OR (MONGO_SERVICE_ACCOUNT_TYPE = "ServiceLocalNetwork" OR MONGO_SERVICE_ACCOUNT_VALID)</Publish>
+ </Control>
+ <Control Id="Cancel" Type="PushButton" X="309" Y="244" Width="56" Height="17" TabSkip="no">
+ <Text>Cancel</Text>
+ <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
+ </Control>
+ <Control Id="CheckBox1" Type="CheckBox" X="8" Y="48" Width="132" Height="18" Property="MONGO_SERVICE_INSTALL" CheckBoxValue="TRUE" TabSkip="no">
+ <Text>Install MongoD as a Service</Text>
+ </Control>
+ <Control Id="RadioButtonGroup1" Type="RadioButtonGroup" Property="MONGO_SERVICE_ACCOUNT_TYPE" X="20" Y="62" Width="190" Height="44">
+ <RadioButtonGroup Property="MONGO_SERVICE_ACCOUNT_TYPE">
+ <RadioButton X="0" Y="2" Width="184" Height="18" Value="ServiceLocalNetwork" Text="Run service as Network Service user" />
+ <RadioButton X="0" Y="18" Width="184" Height="18" Value="ServiceCustomAccount" Text="Run service as a local or domain user:" />
+ </RadioButtonGroup>
+ <Condition Action="disable">NOT MONGO_SERVICE_INSTALL</Condition>
+ <Condition Action="enable">MONGO_SERVICE_INSTALL</Condition>
+ </Control>
+ <Control Id="textAccountName" Type="Text" X="38" Y="116" Width="76" Height="15" TabSkip="yes">
+ <Text>Account Name:</Text>
+ <Condition Action="disable">NOT MONGO_SERVICE_INSTALL OR MONGO_SERVICE_ACCOUNT_TYPE = "ServiceLocalNetwork"</Condition>
+ <Condition Action="enable"><![CDATA[MONGO_SERVICE_INSTALL AND MONGO_SERVICE_ACCOUNT_TYPE <> "ServiceLocalNetwork"]]></Condition>
+ </Control>
+ <Control Id="textAccountDomain" Type="Text" X="38" Y="98" Width="76" Height="15" TabSkip="yes">
+ <Text>Account Domain:</Text>
+ <Condition Action="disable">NOT MONGO_SERVICE_INSTALL OR MONGO_SERVICE_ACCOUNT_TYPE = "ServiceLocalNetwork"</Condition>
+ <Condition Action="enable"><![CDATA[MONGO_SERVICE_INSTALL AND MONGO_SERVICE_ACCOUNT_TYPE <> "ServiceLocalNetwork"]]></Condition>
+ </Control>
+ <Control Id="textAccountPassword" Type="Text" X="38" Y="134" Width="76" Height="15" TabSkip="yes">
+ <Text>Account Password:</Text>
+ <Condition Action="disable">NOT MONGO_SERVICE_INSTALL OR MONGO_SERVICE_ACCOUNT_TYPE = "ServiceLocalNetwork"</Condition>
+ <Condition Action="enable"><![CDATA[MONGO_SERVICE_INSTALL AND MONGO_SERVICE_ACCOUNT_TYPE <> "ServiceLocalNetwork"]]></Condition>
+ </Control>
+ <Control Id="editAccountDomain" Type="Edit" X="124" Y="98" Width="101" Height="15" TabSkip="no" Property="MONGO_SERVICE_ACCOUNT_DOMAIN">
+ <Text>{32767}</Text>
+ <Condition Action="disable">NOT MONGO_SERVICE_INSTALL OR MONGO_SERVICE_ACCOUNT_TYPE = "ServiceLocalNetwork"</Condition>
+ <Condition Action="enable"><![CDATA[MONGO_SERVICE_INSTALL AND MONGO_SERVICE_ACCOUNT_TYPE <> "ServiceLocalNetwork"]]></Condition>
+ </Control>
+ <Control Id="editAccountName" Type="Edit" X="124" Y="116" Width="101" Height="15" TabSkip="no" Property="MONGO_SERVICE_ACCOUNT_NAME">
+ <Text>{32767}</Text>
+ <Condition Action="disable">NOT MONGO_SERVICE_INSTALL OR MONGO_SERVICE_ACCOUNT_TYPE = "ServiceLocalNetwork"</Condition>
+ <Condition Action="enable"><![CDATA[MONGO_SERVICE_INSTALL AND MONGO_SERVICE_ACCOUNT_TYPE <> "ServiceLocalNetwork"]]></Condition>
+ </Control>
+ <Control Id="editAccountPassword" Type="Edit" X="124" Y="134" Width="101" Height="15" TabSkip="no" Password="yes" Property="MONGO_SERVICE_ACCOUNT_PASSWORD">
+ <Text>{32767}</Text>
+ <Condition Action="disable">NOT MONGO_SERVICE_INSTALL OR MONGO_SERVICE_ACCOUNT_TYPE = "ServiceLocalNetwork"</Condition>
+ <Condition Action="enable"><![CDATA[MONGO_SERVICE_INSTALL AND MONGO_SERVICE_ACCOUNT_TYPE <> "ServiceLocalNetwork"]]></Condition>
+ </Control>
+ <Control Id="textServiceName" Type="Text" X="23" Y="161" Width="62" Height="15" TabSkip="yes">
+ <Text>Service Name:</Text>
+ <Condition Action="disable">NOT MONGO_SERVICE_INSTALL</Condition>
+ <Condition Action="enable">MONGO_SERVICE_INSTALL</Condition>
+ </Control>
+ <Control Id="editServiceName" Type="Edit" X="98" Y="161" Width="105" Height="15" TabSkip="no" Property="MONGO_SERVICE_NAME">
+ <Condition Action="disable">NOT MONGO_SERVICE_INSTALL</Condition>
+ <Condition Action="enable">MONGO_SERVICE_INSTALL</Condition>
+ </Control>
+ <Control Id="textDataDirectory" Type="Text" X="23" Y="188" Width="64" Height="15" TabSkip="yes">
+ <Text>Data Directory:</Text>
+ <Condition Action="disable">NOT MONGO_SERVICE_INSTALL</Condition>
+ <Condition Action="enable">MONGO_SERVICE_INSTALL</Condition>
+ </Control>
+ <Control Id="textLogDirectory" Type="Text" X="23" Y="210" Width="62" Height="15" TabSkip="yes">
+ <Text>Log Directory:</Text>
+ <Condition Action="disable">NOT MONGO_SERVICE_INSTALL</Condition>
+ <Condition Action="enable">MONGO_SERVICE_INSTALL</Condition>
+ </Control>
+ <Control Id="editDataDirectory" Type="Edit" X="98" Y="188" Width="237" Height="15" TabSkip="no" Property="MONGO_DATA_PATH">
+ <Text>{32767}</Text>
+ <Condition Action="disable">NOT MONGO_SERVICE_INSTALL</Condition>
+ <Condition Action="enable">MONGO_SERVICE_INSTALL</Condition>
+ </Control>
+ <Control Id="editLogDirectory" Type="Edit" X="98" Y="210" Width="238" Height="15" TabSkip="no" Property="MONGO_LOG_PATH">
+ <Text>{32767}</Text>
+ <Condition Action="disable">NOT MONGO_SERVICE_INSTALL</Condition>
+ <Condition Action="enable">MONGO_SERVICE_INSTALL</Condition>
+ </Control>
+ </Dialog>
+
+ <!-- A dialog box to choose to optionally install Compass -->
<Dialog Id="CompassDlg" X="50" Y="50" Width="370" Height="270" Title="MongoDB Compass">
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" Text="WixUI_Bmp_Banner" TabSkip="no" Disabled="yes" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" TabSkip="yes" Disabled="yes" />
@@ -49,8 +160,7 @@
<Control Id="InstallCompass" CheckBoxValue="1" Property="SHOULD_INSTALL_COMPASS" X="15" Y="243" Width="150" Height="17" Text="Install MongoDB Compass" Type="CheckBox" />
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="&amp;Back" TabSkip="no">
- <Publish Event="NewDialog" Value="MongoSetupTypeDlg">WixUI_InstallMode = "InstallComplete" OR WixUI_InstallMode = "InstallTypical"</Publish>
- <Publish Event="NewDialog" Value="CustomizeDlg">WixUI_InstallMode = "InstallCustom"</Publish>
+ <Publish Event="NewDialog" Value="ServiceDlg">1</Publish>
</Control>
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Text="&amp;Next" TabSkip="no" Disabled="no" >
<Publish Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
@@ -61,6 +171,7 @@
</Dialog>
<ProgressText Action="InstallCompassScript">Installing MongoDB Compass... (this may take a few minutes)</ProgressText>
- </UI>
+
+ </UI>
</Fragment>
</Wix>