.exe Runs Then Closes Too Quick

9,496

If you run the .exe from a command line window the window will not automatically close after running and you will be able to see the output.

Shift+Right-click in the folder the .exe is contained in, then select Open command window here from the context menu that opens. This will open a command prompt where you will type the exe file and hit enter to run.

The window will stay open after the exe exits and you should be able to see the error message.

Share:
9,496

Related videos on Youtube

PositiveGuy
Author by

PositiveGuy

I'm so nice, sometimes people slap me and tell me to start being mean :).

Updated on September 18, 2022

Comments

  • PositiveGuy
    PositiveGuy almost 2 years

    I've got a vpn install for azure that I'm trying to run. It's an exe. So when I runt it (doublt-click it), I get a quick flash of 2 console windows and then it just closes too fast for me to see what's going on. The install just fails after that.

    So how can I get that exe's command line windows to stay open so I can troubleshoot why the install isn't working? I'm sure those 2 command windows will tell me.

  • PositiveGuy
    PositiveGuy about 9 years
    I do not see an option in the context menu for starting up a command line window when I do what you say
  • R Drast
    R Drast about 9 years
    You used SHIFT+RightClick on empty space in the folder view?
  • Dan Griffin
    Dan Griffin about 9 years
    Yeah Shift+RightClick will add the open command window here to the context menu. Easier than navigating to the directory
  • PositiveGuy
    PositiveGuy about 9 years
    well this is stupid. I can't even post an image to show you because I haven't built up enough reputation since I'm a new account on stack overflow. How damn irritating.
  • PositiveGuy
    PositiveGuy about 9 years
    yea I'm just not seeing that option. I only see "open". Note that I'm running windows in Parallels if that helps. In order to right-click in Parallels you have to hold down Ctrl + Shift
  • Dan Griffin
    Dan Griffin about 9 years
    Ok then you can also open a cmd window and navigate to the folder using the cd command, then run the .exe file
  • PositiveGuy
    PositiveGuy about 9 years
    did that, that was actually the first thing I did. cd'd to the folder and ran the exe, still the 2 console windows that come up during the running of the exe disappeared
  • PositiveGuy
    PositiveGuy about 9 years
    tried the bat file too. Maybe I didn't put in the right lines. Here is what was in my bat file: cmd /k \\psf\home\desktop\azure_vpn.exe PAUSE. This does run the exe but again the windows still close.
  • Dan Griffin
    Dan Griffin about 9 years
    In that case the two windows are separate processes that are created by the executable file. I would look for some sort of log that might contain the error or try to figure out what the exe file is executing in those windows. Without modifying the exe I dont think you can get those windows to stay open.
  • PositiveGuy
    PositiveGuy about 9 years
    right...yea maybe windows event logs, good idea