windows-installer icon indicating copy to clipboard operation
windows-installer copied to clipboard

Command-line output suppressed?

Open jacobq opened this issue 6 years ago • 2 comments

I have an electron app that takes some command line arguments/parameters/switches like --help and --version. (I don't think it matters, but I am building it with ember-electron which uses electron-forge.) It seems that I can successfully pass command-line arguments on Windows using the syntax:

X:\some\path>my-app.exe <electron parameters> --- <app parameters>

However, I can't seem to produce any console output. For example, running my-app.exe --- --help appears to do nothing (except momentarily display the busy cursor). I would like to be able to display this output on the command line. Is this possible? I presume this is happening because the exe file is creating a new process, whose output isn't associated with this terminal. Where does that output go? (e.g. does it get logged somewhere or just discarded?)

Note: I tried set DEBUG=* and set ELECTRON_ENABLE_LOGGING=1 but this did not seem to make any output appear on the terminal/console.

jacobq avatar Jul 18 '18 23:07 jacobq

Can anyone explain this? I also need the command line output. When the app is started on command line it seems to run "in background". A few ms after running the app, the next command-line (waiting for user input) appears, as if the app was stopped or running in some kind of daemon mode.

fishbone1 avatar Oct 07 '20 06:10 fishbone1

electron-winstaller v5.1.0 still having these problems. Our app is coded to make no window on certain command line arguments. And we have these problems:

  1. No output.
  2. Several processes of myapp.exe run in background forever.
  3. myapp.exe changes current working dir, so relative paths do not work.

When executing directly myapp.exe in the version sub directory, e.g. app-1.2.3\myapp.exe, then everything works well.

The problem is, that is our users has some scripts or links to run app-1.2.3\myapp.exe, they have to update these scripts after each update of our app.

xmedeko avatar Jul 31 '23 18:07 xmedeko