Hello,
I am quite new to wix and stuck with an issue.
I have a windows service which is installed as a part of an MSI , the service
start being set to manual. The users can change this to automatic after
installation.
Now if we install an update, the service is deleted and re-installed and the
service start is set to manual again. I would like to have a way in which the
service start type should not change if the user has set it to automatic when
an upgrade msi is being installed.
I tried :
Get the current service start type
<Property Id='SERVICE_STATUS'>
<RegistrySearch Id='ServiceStatus' Type='raw' Root='HKLM'
Key='SYSTEM\Current Control Set\Services\My Service' Name='Start' />
</Property>
=====
Based on the Property tried suppressing the installservices and deleteservices
elements in the InstallExecuete table
<DeleteServices Suppress="yes" >SERVICE_STATUS </DeleteServices>
<InstallServices Suppress="yes" >SERVICE_STATUS<InstallServices >
This did not work.
====
Then I tried to create two different component elements:
<Component Id="My_Service" Guid="67B3D72D-0CB9-41BA-B76A-ADEF1DF87745"
DiskId="1">
<!-- If the service is installed and set to automatic -->
<Condition><![CDATA[SERVICE_STATUS AND (SERVICE_STATUS =
"#2")]]></Condition>
<Serviceinstall ... Start="auto"...
<File...
<servicecontrol...
and
<Component Id="My_Service1"
Guid="A50691F0-5C0F-49d5-AA27-9C5280278459" DiskId="1">
<!--If the service is not installed or not set to automatic and
installed-->
<Condition><![CDATA[(NOT SERVICE_STATUS) OR (SERVICE_STATUS <>
"#2")]]></Condition>
<ServiceInstall Start="demand"...
<File...
<servicecontrol...
In this case service does not install when I upgrade from older version of MSI
=======
Any other ways in which i tried setting a property and using it as a value in
the start attribute of serviceinstall element failed as it did not support
properties.
Could anyone point me to the correct way of doing this?
Thanks
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users