Tag Archives: execute command without opening window

Picture showing the Application screen highlighting the Application type change from Console Application to Windows Forms Application

How to create a console application in Visual Studio that won’t open a command window when it runs

If you’ve written a small console application, say something that doesn’t require a UI e.g. a  batch script that you want to make into an exe, you’ve probably noticed that an unnecessary/unwanted command window pops up.

To stop the command window from opening you can simply make a change in the project properties by setting the Application Type from Console Application to Windows Forms Application.

This can be done from within the project, click on Projects at the top of the screen and then click on Properties as show below.

Picture showing Project options highlighting Properties

Then change the application type from Console Application to Windows Forms Application as shown below.

Picture showing the Application screen highlighting the Application type change from Console Application to Windows Forms Application