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

  • Home
  • SEARCH
  • 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 7026525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:07:44+00:00 2026-05-28T00:07:44+00:00

I have the following code: var psi = new ProcessStartInfo(); psi.FileName = @C:\gw\gw.exe; psi.WorkingDirectory=@C:\gw;

  • 0

I have the following code:

var psi = new ProcessStartInfo();

psi.FileName = @"C:\gw\gw.exe";
psi.WorkingDirectory=@"C:\gw";

Process process = Process.Start(psi);

For some reason, the gw.exe process is crashing on startup. Windows just says “This program has been shut down” and has the usual “Looking for a solution online” box and it just crashes.

When I launch gw.exe from Windows explorer, it executes just fine. It is a WPF application and it runs just fine outside of my program. Anyone have any suggestions?

  • 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-28T00:07:45+00:00Added an answer on May 28, 2026 at 12:07 am

    Your code is not how one starts a process:

    Console.WriteLine("Running"); 
    Process pr = new Process(); 
    pr.StartInfo.FileName = "Notepad.exe"; 
    pr.StartInfo.Arguments = "test.dat"; 
    pr.Start(); 
    while (pr.HasExited == false)     
       if ((DateTime.Now.Second % 5) == 0)     
       { 
          // Show a tick every five seconds.         
          Console.Write(".");         
          System.Threading.Thread.Sleep(1000);     
    }
    

    I go into further detail in my blog post How to Launch an External Application in C#:

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

Sidebar

Related Questions

I have the following code: var carsContext = new CarsDataContext(); IQueryable<Car> allCars = carsContext.Cars;
I have the following code: var tlp = new TableLayoutPanel { Location = new
I have the following code: var myRootRef = new Firebase('https://myacct.firebaseIO.com'); var collectionRef = myRootRef.child('collection');
I have the following code: var numberOfSelectedOptions = new Array(); numberOfSelectedOptions[0]=0; numberOfSelectedOptions[1]=0; numberOfSelectedOptions[2]=0; $(a.tagvariantoption).live(click,
I have the following code: var words = new Object(); $(li.words).each(function(){ var thisId =
I have the following code var section = new CustomConfigurationSection(); section.SectionInformation.Type = System.Configuration.NameValueFileSectionHandler; section.SectionInformation.SetRawXml(sectionXml);
I have the following code: var tf:TextFormat = new TextFormat(); tf.font = arial; aRButton.textField.antiAliasType
I have the following code: var items = new List<string> {1, 2, 3}; //
I have following code var res = from c in model.Data select new object[]
I have the following code: var win = new Ext.Window({ width:200, height:200, autoScroll: true,

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.