XSIforum.com

Utilidad para activar SPM previo a abrir XSI si es necesario

0 Usuarios y 1 Visitante están viendo este tema.

alanf

  • *****
  • 6026
  • Pipeline Developer @ Felix & Paul Studios
Hola,

Estoy en un portatil casi todo el tiempo y cuando hiberno me suele pasar de vez en cuando de que mi SPM License Server falla y deja de estar activo. Luego cuando quiero abrir XSI me da el tipico error de licencia y entonces tengo que ir a activar el SPM y volver a ejecutar XSI, que entonces funciona.

Y el otro dia se me ocurrio... y si el SPM se ejecutase automaticamente (si no estuviese activo) y entonces abriese XSI, con un solo click? Asi que me hize un script (en lenguaje AHK) para esto mismo.

Hace lo siguiente:
Si el license server no esta activo, lo activa ejecutando:
sc start spmd
Tras esto, si XSI no esta abierto, ejecuta el XSI.bat en .\Application\bin\

Para el que le interese, hay una version compilada aqui.
(Que conste que solo lo he probado bajo WinXP. No se si funciona bajo Vista.)

Es muy simple de usar, copialo/ponlo en:
c:\Softimage\XSI_XXX\
y hazte un acceso directo a el. ;)


El codigo fuente, para el que quiera:

Código: [Seleccionar]
;
; Author:         Alan Fregtman
;
; Script Function:
; checks if softimage's license server is running, then runs it if necessary,
;    before running XSI itself.
;
; Usage:
; Put the file in your c:\Softimage\XSI_X.XX\ folder and run it.
;

#NoEnv
#NoTrayIcon
SetWorkingDir %A_ScriptDir%


IfExist, %A_ScriptDir%\Application\bin\XSI.bat
{
Process, Exist, spmd.exe
if %ErrorLevel% = 0
{
; MsgBox The license server process is not present.
Run, sc start spmd, , Hide
}

Process, Exist, XSI.exe
if %ErrorLevel% = 0
{
Run %A_ScriptDir%\Application\bin\XSI.bat, %A_ScriptDir%\Application\bin, Hide
}
}
else
MsgBox Please run me from a c\Softimage\XSI_X.XX\ folder and try again.

agedito

  • ***
  • 1524
  • ¡¡Yo lo que quiero es milonguear!!
Re: Utilidad para activar SPM previo a abrir XSI si es necesario
« Respuesta #1 en: 21 Octubre 2007, 13:15:27 »
Muy buena idea.. no conocía ese lenguaje,habrá que echarle un ojo