Launching CMD.EXE windows from cygwin bash

Mark J. Reed markjreed@gmail.com
Fri Jun 26 14:53:00 GMT 2009


I wrote:
>>cygstart /cygdrive/c/windows/system32/cmd.exe
>>
>>or, if you have that in your $PATH, just
>>
>>cygstart `which cmd`

As it turns out, just

cygstart cmd

works on both my installations at work (one 1.5 and one 1.7, both on
Vista); on the PC at home (1.7 on XP) I had to specify the full path
to cmd.exe.  Will have to investigate that when I get home.


Barry Buchbinder pointed out:
> cygstart has an option to set the working directory.

An excellent point!

cygstart -d /path/to/directory cmd

should do the trick.

-- 
Mark J. Reed <markjreed@gmail.com>

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



More information about the Cygwin mailing list