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 3.3k times
0
-
1How are you getting into the command prompt, exactly? – gronostaj Aug 30 '15 at 12:13
-
I go to the .exe file and select "open as administrator" – TheQuantumMan Aug 30 '15 at 12:20
-
the "C:\Windows\System32\cmd" is its name? – TheQuantumMan Aug 30 '15 at 12:22
-
yes, Also when in an explorer window, you can go to the "file" menu , and “Open command prompt” it will then start with the CD (current directory) of that folder you are in. – Psycogeek Aug 30 '15 at 12:35
-
1Adam Landos and Landos Adam: If you are the same person, it would appear that you have accidentally created two accounts. You should use the [contact form](http://superuser.com/contact) and select “I need to merge user profiles” to have your accounts merged. In order to merge them, you will need to provide links to the two accounts. For your information, these are http://superuser.com/users/490199/adam-landos and http://superuser.com/users/490206/landos-adam. You’ll then be able to [edit], comment on and accept answers to this question. – Scott - Слава Україні Aug 31 '15 at 07:56
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.