I don't know much about command prompt, or how it is used, but I want to get a code to access a program of mine and I wants me to open a .exe file with command prompt and input my ID so I can get the password. But whenever I input my ID, it shows the password just briefly and then the command prompt window closes instantly. Is there a way to access the .exe file and put my ID and get my password without the window closing? Thanks in advance! NOTE:I am running on a windows 10 software.
Asked
Active
Viewed 5.3k times
1 Answers
2
If I understood your post correctly you want to run an executable and then read the output from that program which is writting to 'that black box'.
There are several ways to do this:
- Open a command prompt and start the program from there.
E.g. [start] [run]cmdC:\Program Files\myprog.exe.
After running the program you end up back on the command prompt, with the output from the program still visible. - If you need to do this often and you do not wish to manually start a shell you can write a batch file like this:
@echo off C:\Program Files\myprog.exe pause>nul
- Or you can do the same with cmd.exe and use the /k switch.
cmd /k myprog.exe
Also see this post.