Starting and stopping Hyperview Services from the command line

Starting and stopping Hyperview Services from the command line

Although generally Hyperview Services are managed with the Hyperview Service Controller, it is possible to start and stop Hyperview Services from the command line. This would be useful if you had a Hyperview Service configured to load and serve a "most recent" project file. If a new matching file appeared, the Hyperview Service would not notice. It would need to be stopped and restarted in order to load the updated build.

With the command line interface, you can include a script in your build routine that automatically restarts some or all of your Hyperview Services, causing them to load the most recent project file, if they were configured that way.

Command Line

To start or stop Hyperview Services, use this command:

"C:\Program Files (x86)\GMCL\DBDOC\Programs\HyperviewServiceController.exe" /servicecmd=[cmd<:port>]

where cmd can have the following values:

  • start: Starts all the Hyperview Services that have been created. If a service is already running, has no effect.
  • start:N: Starts the Hyperview Service running on port N (assuming it exists).
  • stop: Stops all the Hyperview Services that have been created. If a service is already stopped, has no effect. Note that stopping a service may not be instantaneous. It may take 30 seconds or so.
  • start:N: Stops the Hyperview Service running on port N (assuming it exists).

You must run the script with Administrator privilege in order to be able to control Hyperview Services in this way.

Example

For example, if you wanted to automatically stop and restart all your Hyperview Services, a sequence of commands like the following could be used.

"C:\Program Files (x86)\GMCL\DBDOC\Programs\HyperviewServiceController.exe" /servicecmd=stop
[WAIT 30 SECONDS]
"C:\Program Files (x86)\GMCL\DBDOC\Programs\HyperviewServiceController.exe" /servicecmd=start

Or perhaps only one service on a known port requires this treatment. If the service question was running on port 8001 (run the Hyperview Service Controller to find the port), these commands could be used.

"C:\Program Files (x86)\GMCL\DBDOC\Programs\HyperviewServiceController.exe" /servicecmd=stop:8001
[WAIT 30 SECONDS]
"C:\Program Files (x86)\GMCL\DBDOC\Programs\HyperviewServiceController.exe" /servicecmd=start:8001


See Also