NetTalk Central

Author Topic: Trouble with same exe as 2nd service  (Read 3210 times)

seanh

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
    • Email
Trouble with same exe as 2nd service
« on: March 05, 2018, 10:03:42 PM »
I'm Trying to run a NTWS on different ports.  I can set the service names etc via config.  I copy each to seperate directories.  I can run as an application 2 copies fine.
But I can't get this to work when they're a service.
I can get the 2 services installed, but only the fir one started runs

Using MSSQL, AD , Windows Authentication

Any pointers?

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: Trouble with same exe as 2nd service
« Reply #1 on: March 05, 2018, 11:05:58 PM »
We have this working. Sounds like you are doing it correctly. But in case it helps i'll explain what we do.

I have to set the service name at runtime so each EXE reports to Windows the correct service name.

So in Global Embed | Self Service - Initialize Variables, I set the ServiceName in a variable, and use that variable for the SelfService Global Externsion. We control this servicename via the command line (we do this so we can run all EXEs from the same folder and they can all use the same INI file for their other config).

SelfService cannot create our Service Setup correctly as we need to add a command line parameter (it can probably do it via code), but we are used to using the SC command, so thats what we do. eg

sc create InhabitMove1 type= interact type= share start= auto binpath= "C:\MOVE\MOVE.EXE ServiceName=InhabitMove1 IP=192.168.0.100" displayname= "Inhabit Move Server 1"
sc description InhabitMove1 "Core CRM Web Server"

sc create InhabitMove2 type= interact type= share start= auto binpath= "C:\MOVE\MOVE.EXE ServiceName=InhabitMove2 IP=192.168.0.101" displayname= "Inhabit Move Server 2"
sc description InhabitMove2 "Core CRM Web Server"


Then I make sure "Only Allow One Instance to Run at a time" is unchecked.

Two services will appear and they can both be started and stopped independently.

« Last Edit: March 05, 2018, 11:11:44 PM by bshields »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11194
    • View Profile
Re: Trouble with same exe as 2nd service
« Reply #2 on: March 06, 2018, 09:46:16 PM »
>> Then I make sure "Only Allow One Instance to Run at a time" is unchecked.

This.

Cheers
Bruce


seanh

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
    • Email
Re: Trouble with same exe as 2nd service - Solved
« Reply #3 on: March 09, 2018, 04:20:15 AM »
Yeah yeah ok. 
I admit I never realllly looked at all the check boxes.   This one escaped me.

My bad.  Red faced. etc
Thanks All