Start Windows Service from NAV

 

ServiceController := ServiceController.ServiceController;

ServiceController.ServiceName(‘Service Name’);

ServiceController.DisplayName(‘Display Name’);

ServiceController.MachineName(‘Machine Name’);

ServiceController.Start;

ServiceController.WaitForStatus(ServiceController.Status.Running);

ServiceController.Refresh;

MESSAGE(TEXT001);

 

TEXT001 – Service Started

ServiceController –   DOTNET   – 

System.ServiceProcess.ServiceController.’System.ServiceProcess,  Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s