Starting the license server service from a batch file


It’s rare, but the occasional customer has a problem where the license server keeps stopping (for example, after the computer goes to sleep). Normally the license service should always be running, but if you were really stuck and needed a workaround, you could add something to XSI.bat to start the license server before starting xsi.exe.

For example, here’s something I got from stackoverflow. You probably could just call sc start; if the service is already running, sc will just report that and nothing bad will happen.

@echo off
for /F "tokens=3 delims=: " %%H in ('sc query "Softimage License Server" ^| findstr "STATE"') do (
  if /I "%%H" NEQ "RUNNING" (
   sc start "Softimage License Server"
   echo "Starting Softimage License Server"
  )
)

The service name (on lines 2 and 4) is the same name you specified in LMTOOLS:
LMTOOLS-Service_Name

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