Question

I'm experimenting with CS-Script and my problem is that each time I run a script the console window is automatically closed when the script exits. How can I prevent this from happening?

Was it helpful?

Solution

If you don't want to change the script itself then open a command window and execute the script from the command line. The only reason the console closes after the script completes is because it was created by the script itself. The script will not close a console that you opened.

OTHER TIPS

I don't how you call it but you can always call it with "Ctrl + R" > cmd.exe /k [your command] or Console.ReadLine() in your script.

A poor way concists of adding a Console.Read() at the end of you script.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top