Forum posts for srvany.exe

srvany.exe does not start .bat file

(OS: Windows 7)

Using SC.EXE I have created a Windows Service. Additionally, I created the necessary registry entries to specify the Application path (using key Parameters).

The 'Application' is a .BAT file that sets several environment variables and then calls a Python script. When running the .BAT file directly from within CMD I get normal, desired behavior.

Using the Service Manager I can start and stop the service (works also with SC.EXE directly issued from CMD). All that is ok, no warning or errors or anything else to be seen (in Event Log).

The BAT file does not get executed. I double checked the Application path, double checked the service name.


Correction: The BAT file actually gets executed (created simple log file from within the BAT file). What does not work, apparently, is to execute the python.exe as the last command in the BAT file. I can't verify what error is generated by python.exe as I don't see any log files, event log entries...


BAT file contents:

@ECHO OFF
REM ==========================================================================
REM ProcessIntergrationBridge Microsoft Windows Service Shell Script
REM ==========================================================================
SET CONSEQUOR_PIB_HOME=C:optconsequorpib
SET CONSEQUOR_PIB_VERSION_DESIGNATOR=pib_b0100
SET CONSEQUOR_PIB_DATA=C:varoptconsequorpib
SET CONSEQUOR_PIB_LOG=C:varoptconsequorpiblog
SET CONSEQUOR_PIB_LOG_FILE=C:varoptconsequorpiblogpib.log
SET PYTHONPATH=C:optconsequorpib\%CONSEQUOR_PIB_VERSION_DESIGNATOR%
SET PYTHONHOME=C:optconsequorpibpython-runtimewin
SET PATH=%CONSEQUOR_PIB_HOME%\%CONSEQUOR_PIB_VERSION_DESIGNATOR%in;%CONSEQUOR_PIB_HOME%python-runtimewin;CONSEQUOR_PIB_HOME%python-runtimewinDLLs;CONSEQUOR_PIB_HOME%python-runtimewinlibs;CONSEQUOR_PIB_HOME%python-runtimewinLib;%PATH%
SET CMD=%PYTHONHOME%pythonw.exe %CONSEQUOR_PIB_HOME%\%CONSEQUOR_PIB_VERSION_DESIGNATOR%\%CONSEQUOR_PIB_VERSION_DESIGNATOR%start_pibpib_run_server.py debug
%CMD%


PIBD Service Registry entries: (Oh Merde Alors - I can't post pictures yet... - If someone wants to see then I can send via direct email ...)

PIBD Registry Entry

PIBD Parameters Setting

Thank you for any hint on how to debug this, fix it, change it - You know.

Kind regards

Frank - having spent days now trying to understand Windows mysteries.

View complete forum thread with replies

Other posts related to srvany.exe

See Related Forum Messages: Follow the Links Below to View Complete Thread

Windows srvany.exe and service STOP
Problems running python program with srvany.exe
srvany.exe does not start .bat file
Creating Service from Executable (INSTSRV.EXE and SRVANY.EXE) Error - 'Service started and t…
Specify command line for application while creating service using SRVANY.EXE
Searching for srvany.exe from Windows 7 Resource Kit: is this actual software or just a book?
Installing srvany.exe to run a jar file as a service using InstallShield (without editing th…

What is the carbon footprint of your coffee?

Is it low? Is it high? Can this things really kill the planet Earth? Maybe the answer will surprise you. Maybe not.