Menu

#6 Example for start service on install needed

open
nobody
None
5
2012-09-15
2007-03-19
Carsten b
No

Hello,

i want to install a service and then start him. During uninstall i want to stop and remove the service.

See enclosed example:

<component id="user-content-C_FL_HIBSERV.EXE" guid="{7C9AB67C-DB44-4E17-99BC-CA42154DC3E3}">
<file id="user-content-FL_HIBSERV.EXE" diskid="1" keypath="yes" longname="HIBSERV.EXE" name="HIBSERVE" source="D:\Download\BackupTest\HIBACK\HIBSERV.EXE" defaultsize="126976" defaultversion="6.6.5">
<serviceinstall id="user-content-HibServ" errorcontrol="normal" name="Hibserv" start="auto" type="ownProcess" displayname="HICOMP Gui-Server">
<permission user="Administrators" serviceuserdefinedcontrol="yes" servicestop="yes" servicestart="yes" servicequerystatus="yes" servicequeryconfig="yes" servicepausecontinue="yes" serviceinterrogate="yes" serviceenumeratedependents="yes" servicechangeconfig="yes" extended="yes">
</permission></serviceinstall>
<servicecontrol id="user-content-HibServControl" name="HibServ" remove="uninstall" stop="uninstall" wait="yes" start="install">
</servicecontrol></file></component>

produces error:
ExecSecureObjects: Error 0x80070534: failed to get sid
for account:

I need a functional example, for install a service and with permissions to start, stop and remove during install and uninstall.

Kind Regards

C.Bartholomae

Discussion