install service with multiple dependencies

Post specialized setup scripts you have created here.
Rulan
Posts: 56
Joined: Tue Nov 20, 2012 5:02 am

install service with multiple dependencies

Postby Rulan » Tue Apr 28, 2015 3:18 am

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

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: install service with multiple dependencies

Postby FrancescoT » Tue Apr 28, 2015 12:38 pm

Dear Rulan,

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

Example; SERVICE1 SERVICE2

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Rulan
Posts: 56
Joined: Tue Nov 20, 2012 5:02 am

Re: install service with multiple dependencies

Postby Rulan » Wed Apr 29, 2015 2:42 am

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

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: install service with multiple dependencies

Postby FrancescoT » Wed Apr 29, 2015 11:39 am

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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

khalprin
Posts: 48
Joined: Fri Aug 25, 2006 2:02 pm

Re: install service with multiple dependencies

Postby khalprin » Tue Mar 13, 2018 4:19 pm

Did this issue ever get resolved? I'm using version X3.


Return to “Sample Scripts”

Who is online

Users browsing this forum: No registered users and 4 guests