Käivitage käsuga ".exe" fail

Sisukord:

Käivitage käsuga ".exe" fail
Käivitage käsuga ".exe" fail

Video: Käivitage käsuga ".exe" fail

Video: Käivitage käsuga
Video: A Simple and Profound Introduction to Self-Inquiry by Sri Mooji - YouTube 2024, Aprill
Anonim
Enamik ajast meie programmid töötavad just selliselt, nagu me vajame neid, kuid iga kord, kui teil on see, mis on vähem kui ühistu ja jätab teid otsima võimaluse oma suhtumise probleemi lahendamiseks. Tänane SuperUseri Q & A postitus pakub suurepäraseid soovitusi, et aidata pettunud lugejal saada vajalikke tulemusi.
Enamik ajast meie programmid töötavad just selliselt, nagu me vajame neid, kuid iga kord, kui teil on see, mis on vähem kui ühistu ja jätab teid otsima võimaluse oma suhtumise probleemi lahendamiseks. Tänane SuperUseri Q & A postitus pakub suurepäraseid soovitusi, et aidata pettunud lugejal saada vajalikke tulemusi.

Tänane küsimuste ja vastuste seanss jõuab meile viisakalt SuperUserini - Stack Exchange'i ja kogukonnapõhiste Q & A veebisaitide rühmitusse.

Küsimus

SuperUseri lugeja user418119 soovib leida võimaluse hoida programmi aken piisavalt pikk, et tulemusi näha:

I am trying to run an iteration program. Whenever I click on it, it opens then terminates. When I open the input text file using the program, the iteration completes, then the window instantly closes. How can I:

1. Run it so that the window does not close (and I can see my results)

Or

2. Manage to do the same thing via Command Prompt

I am not super familiar with doing stuff via Command Prompt.

Kas kasutaja418119 programmi akna loomine on piisavalt pikk, et tulemusi näha?

Vastus

SuperUseri kaasautorid mg30rg, misha256 ja Ranayna on meie jaoks vastused. Esmalt üles, mg30gr:

You can create a batch file (.bat) containing two lines. The first one is your application’s command line and the second one is “PAUSE”. It will keep the Command Prompt window open until you press a key or close it using the “X” button. The advantage of this solution is that you can have a separate shortcut to the.bat file so that you can either start your program with or without pausing at the finish.

Järgneb misha256 vastus:

This will leave the Command Prompt window open even after MyApp.exe terminates:

cmd /K “C:SomeFolderMyApp.exe”

You can create a shortcut with the above. This solution works with all console programs and does not require you to go through Command Prompt every time or modify the original.exe file (which you usually cannot).

Incidentally, the /K switch has been around since NT days.

Ja meie viimane vastus Ranaynast:

Another way which is quite useful if the path to the.exe file is a complicated one: Open a Command Prompt window and just drag the.exe file into the window. The full path to the.exe file will be pasted into the Command Prompt window and you just have to press Enter. There is no need to cd into any paths.

Kas teil on seletamiseks midagi lisada? Helistage kommentaarides. Kas soovite lugeda rohkem vastuseid teistelt tech-savvy Stack Exchange'i kasutajatelt? Tutvu täieliku arutelu teemaga siit.

Soovitan: