Windows Service Install Parameters?

Do anyone know how the parameters entry format for entering dependencies for the windows service /install.

Would like to know both for the command line and / or for the ROStartService if possible. Cannot find in the documentation.

In our startup Delphi code, we have:

if ROStartService(‘Is2_Hvac_Mobile_Server’, ‘Is2_Hvac_Mobile_Server’,‘Is2 HVAC Mobile Server - 2021’ ) then begin
ROService.CreateForm(TServerDataModule, ServerDataModule);
ROService.Run;
Exit;
end;

Determined by looking at the ROComboService.pas what the parameters should be and with a little trial and error. Works perfectly. Also learned a great deal about how the service names work. Very instructional. So just in case anyone else would like to know, I have included the code below.

   // Run As Windows Service
   if ROStartService('Is2_Hvac_Mobile_Server', 'Is2 Hvac Mobile Server','Is2 HVAC Mobile Server - 2021', stAuto , 'Is2_DbServer' ) then begin
     ROService.CreateForm(TServerDataModule, ServerDataModule);
 
    ServerDataModule.ROServer.Active := True;
 
     ROService.Run;
     Exit;
   end;

Make sure that you include both the uROComboService and SvcMgr units in the top uses statement. The SvcMgr unit has the stAuto type declaration for the windows service startup types.

2 Likes

Glad you found the answer — and my apologies for the lack of reply, but my colleague best suited to have answered this is off this week, so so this one got lost in the shuffle a bit…