I want to install a service from within a merge module. The service StartName and Password should be configured by user.
My installer is configured as following
module.msm
My Module has Id C68FD1DE_B6A0_4BC1_A7BB_D7DBF65F2DB7
and defines two properties SERVICE_PASSWORD and SERVICE_USER, both having default value NOT DEFINED
.
I added two 'Property set with Formatted' custom actions and configured these properties as targets.
I also have the properties configured on service installation.
setup.exe
My setup loads the merge module and sets the properties SERVICE_PASSWORD and SERVICE_USER on module.msm.
On execution I get the error Service 'service.exe' could not be installed. Verify that you have sufficient privileges to install system services.
, I checked the log and found following important entries:
MSI (c) (88:DC) [10:36:57:178]: PROPERTY CHANGE: Adding SERVICE_PASSWORD property. Its value is 'password'.
MSI (c) (88:DC) [10:36:57:178]: PROPERTY CHANGE: Adding SERVICE_USER property. Its value is '.\user'.
MSI (s) (70:04) [10:38:18:771]: Doing action: ServicePassword.C68FD1DE_B6A0_4BC1_A7BB_D7DBF65F2DB7
MSI (s) (70:04) [10:38:18:781]: PROPERTY CHANGE: Adding [SERVICE_PASSWORD] property. Its value is 'password'.
MSI (s) (70:04) [10:38:18:781]: Doing action: ServiceUser.C68FD1DE_B6A0_4BC1_A7BB_D7DBF65F2DB7
MSI (s) (70:04) [10:38:18:791]: PROPERTY CHANGE: Adding [SERVICE_USER] property. Its value is 'user'.
MSI (s) (70:04) [10:38:29:391]: Executing op: ServiceInstall(Name=service,DisplayName=service,ImagePath="C:\Program Files\company\product\service.exe",ServiceType=16,StartType=2,ErrorControl=1,,Dependencies=,,StartName=NOT DEFINED,Password=****,Description=,,)
When I have a working property then it say Modifying instead of Adding.
MSI (s) (64:9C) [12:06:03:108]: PROPERTY CHANGE: Modifying SERVERNAME.ABB6A92E_9A58_4320_981C_149C0F4EE78A property. Its current value is 'defaultserver'. Its new value: 'targetserver'.
It seems that the correct values are passed to my merge module but are not used. Other merge modules parameterized this way are working, but the properties are not used to install services. So what am I missing to get this to work?