Hide Command Prompt When Executing An EXE

15,488
Dim p as New ProcessStartInfo(@"command", args)
p.WindowStyle = ProcessWindowStyle.Hidden
p.CreateNoWindow = true
Process.Start(p)
Share:
15,488
Muhnamana
Author by

Muhnamana

Phillies, Flyers, Eagles, Tech & video game junkie. My experience is mainly in .NET (VB and my goal is to move into a C# environment) with some VBA experience as well.

Updated on June 28, 2022

Comments

  • Muhnamana
    Muhnamana almost 2 years

    Alright, so here's command I'm currently running. Upon executing, a command prompt apprears until the command is finished.

    Is there any way to hide the command prompt?

    Process.Start(
        "\\path_to_exe\Testing.exe ",
        Arg2 + Arg3 + Arg4 + Arg5 + Arg6 + Arg7 + Arg8 + Arg9 + Arg10 + Arg11)
    
  • Muhnamana
    Muhnamana about 12 years
    I think this might be what I'm looking for but I am getting some syntax errors. Looking into them now.
  • user1703401
    user1703401 about 12 years
    Remove WindowStyle, add UseShellExecute = false.
  • Gopesh Sharma
    Gopesh Sharma about 9 years
    explain what it will do