X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=3.1 required=5.0 tests=BAYES_00,BOTNET,RDNS_DYNAMIC,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Message-ID: <4BA86D10.2050103@tlinx.org> Date: Tue, 23 Mar 2010 00:26:08 -0700 From: Linda Walsh User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Run cmd.exe with /c. References: In-Reply-To: X-Stationery: 0.5.1 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Oleksandr Gavenko wrote: > I want execute .bat file. I think easy way to do this is > invoke $COMSPEC to do that. Like this > > $(subst \,/,$(COMSPEC)) /c file.bat > > from Makefile. > > But cmd fail with error: > > bash# cat 1.bat > @echo off > echo xxx > bash# cmd.exe /c 1.bat > bash: /cygdrive/c/WINDOWS/system32/cmd.exe: Bad address ---- This is weird. I get it too: /tmp> cmd.exe /c dir bash: /Windows/system32/cmd.exe: Bad address When /Windows/system32/cmd.exe WORKS! ie. works: /Windows/System32/cmd.exe /c dir Also if you want to use comspec, use it with cygpath: $(cygpath $COMSPEC) /c dir -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple