delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/08/01/16:05:24

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Originating-IP: [216.95.197.91]
From: "Glenn Mabbutt" <morebeans AT hotmail DOT com>
To: cygwin AT cygwin DOT com
Subject: cygrunsrv and .bat files??
Date: Wed, 01 Aug 2001 15:05:05 -0500
Mime-Version: 1.0
Message-ID: <F7995HfqR77bieLYCT40000bfa0@hotmail.com>
X-OriginalArrivalTime: 01 Aug 2001 20:05:05.0587 (UTC) FILETIME=[41ADC030:01C11AC5]

Hi, I'm attempting to turn a 2 line batch file of mine into a service on 
NT/2000.

The batch file runs as expected stand-alone.

I can daemonize it using FireDaemon, and it works as expected.  (I'd like to 
ultimately not use FireDaemon due to licencing reasons, however.)

Apparently it installs as a service using "cygrunsrv -I SomeService -p 
c:\path\to\app\file.bat", but when I try to start it it pauses for several 
seconds then dies with "error 1062: can't start service".  This is using 
both "cygrunsrv -S SomeService" and "net start SomeService". A reboot made 
no difference.

I thought maybe it was a path problem, so I copied cygrunsrv.exe and 
cygwin1.dll into the same directory as the batch file, and tried it from 
there.  I also copied the batch file into the / of my Cygwin installation, 
and ran cygrunsrv from the /bin folder.  No difference either way.

Also, I don't think the readme mentioned an option for setting "interact 
with desktop".  Is there one?? (doesn't affect me, I tried enabling that 
manually with the created service, didn't help)

Is cygrunsrv capable of handling batch files or is it only capable of 
handling executables??

If this won't work (rather than I've screwed it up ;), are there other free 
{beer|speech} srvany replacements for NT and 2000 out there??

Thanks,
Glenn



         --------------------------------------
Bill Gates: "Innovate."
Me: "You keep using that word. I do not think it means what
      you think it means."


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019