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 8091609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:06:12+00:00 2026-06-05T20:06:12+00:00

I launch an executable in the usual way: Process p = new Process(); p.StartInfo.UseShellExecute

  • 0

I launch an executable in the usual way:

Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.WorkingDirectory = @"C:\someDirectory\";
p.StartInfo.FileName = "ConsoleProgram.exe";
p.Start();

Currently, the executable is not in C:\someDirectory\, so I want the above to fail due to an executable that was not found.

Instead, what it does is that it, for some reasons, locates a different executable by the same name on my Desktop! (I know this because if I rename the .exe on the Desktop, the software complains about a .exe that wasn’t found.) How can I prevent this behavior, and enforce a particular path and no other path?

  • 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-06-05T20:06:13+00:00Added an answer on June 5, 2026 at 8:06 pm

    Add the complete path info to FileName.

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

Sidebar

Related Questions

Our C# application will launch a console application executable by doing this: Process correctionProcess
I have a problem, I use Process.Start to launch an executable, although is it
Im using Process and ProcessStartInfo to launch a cmd window with the usual redirected
My application calls Runtime.exec() to launch an executable in a separate process at start
i'm attempting to launch a command line executable program as a background process in
I've got a dual processor machine and I would like to launch an executable
I launch an activity to capture a picture from camera: Intent i = new
For the option to launch a new EC2 instance like this one, how similar
I have a Java executable that takes in command line arguments to launch root
I new to web-start and We are using exe4j to create executable from One-jar.

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.