Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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" To: cygwin AT cygwin DOT com Subject: cygrunsrv and .bat files?? Date: Wed, 01 Aug 2001 15:05:05 -0500 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: 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/