- AutoExNT service won't start
- Posted by Rune on December 31st, 2007
Hi
I have tried to use the AutoExNT-mechanism to create a service for running a
java application (Protégé) via a bat-file on a Windows 2003 standard x64
edition.
I follow the instructions and everything seems fine. The service is created
successfully.
When I try to start the service I get an error message saying:
----
System error 2 has occurred.
The system cannot find the file specified.
----
This happens regardsless of the content of the AutoExNT.bat-file (even when
it's empty).
- Posted by Pegasus \(MVP\) on December 31st, 2007
"Rune" <Rune@discussions.microsoft.com> wrote in message
news:F2DAE8BB-A445-4C40-AD86-33C46A45B328@microsoft.com...
AutoExNT is Windows NT legacy stuff. Much better to use srvany
and instsrv: http://support.microsoft.com/kb/137890.
- Posted by Rune on December 31st, 2007
Thx - But on the page it says:
.... (but not for batch files) ...
So it cannot be used to run the bat file, which I think I need to run the
java application with parameters.
- Posted by Pegasus \(MVP\) on December 31st, 2007
"Rune" <Rune@discussions.microsoft.com> wrote in message
news:02574295-A9EA-481B-9E6A-60BE70723771@microsoft.com...
Yes, it can. Here is a typical installation file I recently used:
@echo off
goto Start
-----------------------------------------------------
This batch file will install or remove the TOLService
service. Its sole purpose is to invoke the batch file
c:\Tools\TOLMonitor.bat boot time.
-----------------------------------------------------
:Start
echo Installing the service . . .
regsvr32 /s %SystemRoot%\System32\vbscript.dll
c:\Tools\instsrv TOLService c:\Tools\srvany.exe
regedit /s c:\Tools\TOLService.reg
net start TOLService
And here is the .reg file that goes with it:
REGEDIT4
; This registry value will cause the file c:\Tools\TOLMonitor.bat
; to execute when the service is started.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\TOLService\Parameters]
"Application"="c:\\Tools\\TOLMonitor.bat"