".Exe" failo paleidimas komandinės eilutės pagalba

Turinys:

".Exe" failo paleidimas komandinės eilutės pagalba
".Exe" failo paleidimas komandinės eilutės pagalba

Video: ".Exe" failo paleidimas komandinės eilutės pagalba

Video:
Video: Cleaning a DIRTY MacBook! (How To Safely Clean Your Laptop) - YouTube 2024, Balandis
Anonim
Dažniausiai mūsų programos veikia taip, kaip mums reikia, tačiau kiekvieną kartą, kai jūs turite tokią, kuri yra mažiau nei kooperatyvas, paliekate ieškoti būdų, kaip išspręsti savo "požiūrio" problemą. Šiandienos "SuperUser" Q & A žinutė turi keletą puikių pasiūlymų, padėsiančių nusivylusiam skaitytojui gauti jam reikiamus rezultatus.
Dažniausiai mūsų programos veikia taip, kaip mums reikia, tačiau kiekvieną kartą, kai jūs turite tokią, kuri yra mažiau nei kooperatyvas, paliekate ieškoti būdų, kaip išspręsti savo "požiūrio" problemą. Šiandienos "SuperUser" Q & A žinutė turi keletą puikių pasiūlymų, padėsiančių nusivylusiam skaitytojui gauti jam reikiamus rezultatus.

Šiandieninė klausimų ir atsakymų sesija pateikiama su "SuperUser" - "Stack Exchange", bendruomenės valdoma Q & A grupių asociacija.

Klausimas

SuperUser skaitytojas user418119 nori rasti būdą, kad programos langas būtų atidarytas pakankamai ilgai, kad pamatytų rezultatus:

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.

Ar yra galimybė, kad vartotojo418119 programos langas būtų pakankamai ilgas, kad pamatytumėte rezultatus?

Atsakymas

"SuperUser" autoriai: mg30rg, misha256 ir Ranayna atsakė už mus. Pirmiausia, mg30g:

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.

Vykdant atsakymą iš misha256:

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.

Ir mūsų paskutinis atsakymas iš Ranayna:

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.

Ar turite ką nors įtraukti į paaiškinimą? Garsas išjungtas komentaruose. Norite skaityti daugiau atsakymų iš kitų "Tech-savvy Stack Exchange" vartotojų? Patikrinkite visą diskusijų temą čia.

Rekomenduojamas: