delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/08/28/10:29:39

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
Message-ID: <8F23E55D511AD5119A6800D0B76FDDE1CA30DB@cpex3.channelpoint.com>
From: Troy Noble <troy DOT noble AT channelpoint DOT com>
To: "'Downey, Brian'" <Brian_Downey AT quickenloans DOT com>,
"'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
Subject: RE: Proper way to start dos/win executables?
Date: Tue, 28 Aug 2001 08:28:41 -0600
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
X-Scanned-By: MIMEDefang 1.0 (http://www.roaringpenguin.com/mimedefang/)

Cygwin knows about the .cmd and .bat extensions and
invokes cmd.exe by default when you type something
like

bash% $SCRIPT_DIR/start1.cmd

So you shouldn't need the leading exec.

If that doesn't work, try explicitly starting cmd.exe
using the start.exe that comes with NT/Win2K such as:

bash% cmd.exe /C `cygpath -wa $SCRIPT_DIR/start1.cmd` arg1 arg2 ...

but I don't think that'll be necessary "under normal circumstances".
the cygpath converts the $SCRIPT_DIR to a form that
cmd.exe will understand when it tries to open start1.cmd.

Troy

-----Original Message-----
From: Downey, Brian [mailto:Brian_Downey AT quickenloans DOT com]
Sent: Tuesday, August 28, 2001 7:18 AM
To: 'cygwin AT cygwin DOT com'
Subject: Proper way to start dos/win executables?


Hi everyone..

I have a question regarding the starting of a windows executable from within
a cygwin shell script.

The problem I'm having is allowing the passing of modifiers to the original
.exe without using a windows .cmd or .bat file. For example I need to start
a java runtime with these modifiers:

java -Xms64m -Xmx64m ObUpdateGUI "ObUpdateGUI"

Currently, the command resides in a windows .cmd file.  When I attempt to
call this from my script using this:

exec $SCRIPT_DIR/start1.cmd &

It simply runs java from within the cygwin shell and halts the processing of
the script.  I tested out calling "notepad.exe" directly without a .cmd file
and this seems to work.  Is there a better way to do this other than using
.cmd files?  Would it also prevent the script from halting upon execution?

Thanks in advance!

Brian Downey

--
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/

--
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