Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6469537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:00:13+00:00 2026-05-25T06:00:13+00:00

I have an application that can be run using GUI and Non-GUI environment. In

  • 0

I have an application that can be run using GUI and Non-GUI environment. In order to execute with non-GUI environment I need to check condition for “Executing the Application using Shellprompt”(so that GUI should not pop up). I need to check the condition for executing if the application is using shellprompt. How can I specify or check the above condition? Thanks in advance.

Regards,

Arasu.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:00:14+00:00Added an answer on May 25, 2026 at 6:00 am

    so if I understand correctly you are currently able to specify the app should start up on command prompt from a setting in the UI, but you want to be able to specify it should start up on command prompt from the command prompt? you can use the args in the main method of your app for that, just as you would pass args to a comon command line app. like so (from Program.cs):

    namespace WindowsFormsApplication1
    {
        static class Program
        {
            /// <summary>
            /// The main entry point for the application.
            /// </summary>
            [STAThread]
            static void Main()
            {
                if (args != null && args.Contains("-nogui"))
                {
                    // start command shell app version
                }
                else
                {
                    // start UI app version
                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);
                    Application.Run(new Form1());
                }
            }
        }
    }
    

    I may have misread your question so if my answer is not of help to you.. maybe you’ll find this answer helpful instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a delphi (Win32) web application that can run either as a CGI
I have a C#/.NET program that can run both as a console application and
I have a web application that can load plugins through reflection. It currently uses
I have a C++ Windows application that can be extended by writing C++ plugins,
I have a MDI WinForms application that can perform several tasks. Each task is
I have a web application that you can use to import information from another
I have application that is up more than 3 days. I can see in
I have built a MS Access 2007 application that can create reports files in
I have a Windows Forms (.NET) application that can have multiple documents open simultaneously.
I'm writing a drawing application that includes shapes that can have children. When I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.