yeshwant singh
yeshwant singh

Reputation: 164

How to redirect output when running a exe through cygstart command .

I am running a node generated exe binary in cgywin . But it gives error

https://github.com/joyent/node/issues/804 -- checkout the last comment.

It works fine in windows cmd , so I am using cygstart command . But the issue is I cant get the logs after running cygstart .

cygstart someee.exe arguments > output.txt

This also doesn't gives output in output.txt

Can anyone help me out .

Upvotes: 3

Views: 1460

Answers (2)

zjk
zjk

Reputation: 2163

I'm using something like

cygstart.exe cmd /C "node index.js > output"

Then I can use tailf output to show the log.

The temporary cmd prompt is annoying and I'm looking for something better.

Upvotes: 1

SeeJayBee
SeeJayBee

Reputation: 1249

The following works for me. You have to do some quoting and escaping to that the correct information gets passed to ShellExecute.

cygstart bash -c \"ls \> ls.out \"

Upvotes: 1

Related Questions