.exe Runs Then Closes Too Quick
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.
Related videos on Youtube
PositiveGuy
I'm so nice, sometimes people slap me and tell me to start being mean :).
Updated on September 18, 2022Comments
-
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 about 9 yearsI do not see an option in the context menu for starting up a command line window when I do what you say
-
R Drast about 9 yearsYou used SHIFT+RightClick on empty space in the folder view?
-
Dan Griffin about 9 yearsYeah Shift+RightClick will add the open command window here to the context menu. Easier than navigating to the directory
-
PositiveGuy about 9 yearswell 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 about 9 yearsyea 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 about 9 yearsOk then you can also open a cmd window and navigate to the folder using the cd command, then run the .exe file
-
PositiveGuy about 9 yearsdid 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 about 9 yearstried 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 about 9 yearsIn 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 about 9 yearsright...yea maybe windows event logs, good idea