Page 1 of 1

install service with multiple dependencies

Posted: Tue Apr 28, 2015 3:18 am
by Rulan
Hello,
installing a service with "install service" works well with 1 Dependency.. for example "MSSQLSERVER"

is it possible to get an syntax-example of an "Install service" with 2 Dependencies?
For Example "MSSQLSERVER" + "TESTService".

we tried some syntax Combinations with "~" and/or "+" but nothing seems to work. :?
regards

Re: install service with multiple dependencies

Posted: Tue Apr 28, 2015 12:38 pm
by FrancescoT
Dear Rulan,

did you try with separating each service name using a space character?

Example; SERVICE1 SERVICE2

Regards

Re: install service with multiple dependencies

Posted: Wed Apr 29, 2015 2:42 am
by Rulan
Dear Francesco,
Yes we tried it... with space...

No success!

The syntax seems to be different... And I don't know how... :(
Using IA 18...

Regards

Re: install service with multiple dependencies

Posted: Wed Apr 29, 2015 11:39 am
by FrancescoT
Dear Rulan,

it seems that exist a problem with setting the service dependencies (if more then one), using the "Install Service" command.
I'll log a note about this to our dev team.

Meanwhile, you can use the following workaround to solve your problem.
This consists on forcing the service dependence via system registry and the code sample below just does that.

Code: Select all

~InstallAware Clipboard Data~
~Set Variable~
~{6107F343-0643-44B3-BBA0-9B8FE73DA618}~
~NATIVE_ENGINE$MYAH$MYAH$FALSE~
~FALSE~
~Write Registry~
~{F4B48CD7-D7CA-47C5-A6E9-C899EA8D22EE}~
~0~
~2|~
~SYSTEM\ControlSet001\services\$MY_SERVICE_NAME$~
~DependOnService~
~$DEP$~
~FALSE~
~APPEND~
~Set Variable~
~{40050BDB-D02E-4A5B-B065-811380A6CFDA}~
~DEP$MYAH$MYAH$FALSE~
~SQLBrowser~
~Write Registry~
~{0023BF13-CCD1-44C2-AB7B-36BCC0A26920}~
~0~
~2|~
~SYSTEM\ControlSet001\services\$MY_SERVICE_NAME$~
~DependOnService~
~$DEP$~
~FALSE~
~APPEND~
~Set Variable~
~{DDB51185-BFCC-41CC-AC64-4FE02B584508}~
~DEP$MYAH$MYAH$FALSE~
~MSSQL$SQLEXPRESS~
~Set Variable~
~{13EA71E7-9688-4DF8-BD1A-DDFB7018327E}~
~MY_SERVICE_NAME$MYAH$MYAH$FALSE~
~MyService~
~Set Variable~
~{97E8B92B-9638-49B2-B92C-B4EE2B2E2DDC}~
~NATIVE_ENGINE$MYAH$MYAH$FALSE~
~TRUE~

To use the above sample code;
- Copy and paste the code snippet after Apply Install execution in your main script code.
- Remove any defined service dependencies from your "Install Service" command
- Define your effective service name with the MY_SERVICE_NAME variable declaration.

For test purpose the sample defines a dependence to "MSSQL$SQLEXPRESS" and to "SQLBrowser" (see DEV variable declaration).
In your code replace these dependencies as your service requires and obviously, repeat the "write registry" operation if you need to define any additional dependence.

I just tested the above code and it works fine.

Hope this helps you.

Regards

Re: install service with multiple dependencies

Posted: Tue Mar 13, 2018 4:19 pm
by khalprin
Did this issue ever get resolved? I'm using version X3.