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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:35:46+00:00 2026-06-11T12:35:46+00:00

I have made an application in Visual C++ (That uses the command line). I

  • 0

I have made an application in Visual C++ (That uses the command line). I have made a GUI for the same in Visual C# so that the user will not have to use the command line and can run it from the GUI. Now, how do I go about making an installer for the same? In my GUI I have the following code that calls my application and runs it:

                string cmdText;
                cmdText = @"C++HeaderConversionToQFASTXML.exe " + " " + textBox1.Text + " " + textBox2.Text;
                ProcessStartInfo info = new ProcessStartInfo("cmd.exe");
                info.UseShellExecute = false;
                info.RedirectStandardInput = true;
                info.RedirectStandardOutput = true;
                info.CreateNoWindow = true;
                info.WorkingDirectory = @"C:\forAbishek\C++HeaderConversionToQFASTXML\Release\";
                Process p = Process.Start(info);
                p.StandardInput.WriteLine(cmdText);

In this I want the working directory to be the directory where the .exe (C++HeaderConversionToQFASTXML.exe) will reside in the users machine. How do I ensure that the GUI picks up this? The .exe will be installed on the users machine. Can someone help me out? Thank you.

I have made the following change:

                    string cmdText;
                    cmdText = @"C++HeaderConversionToQFASTXML.exe " + " " + textBox1.Text + " " + textBox2.Text;
                    ProcessStartInfo info = new ProcessStartInfo("cmd.exe");
                    info.UseShellExecute = false;
                    info.RedirectStandardInput = true;
                    info.RedirectStandardOutput = true;
                    info.CreateNoWindow = true;
                    String path = System.Reflection.Assembly.GetExecutingAssembly().Location;
                    path = System.IO.Path.GetDirectoryName(path);
                    Directory.SetCurrentDirectory(path);
                    MessageBox.Show(path);
                    info.WorkingDirectory = path;
                    Process p = Process.Start(info);
                    p.StandardInput.WriteLine(cmdText);

It still isn’t working. Where am I going wrong?

  • 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-11T12:35:47+00:00Added an answer on June 11, 2026 at 12:35 pm

    Unless there is a reason you can’t do so, I’d suggest configuring the installer to put the CLI and GUI executables in the same location and skip the whole relative path issue entirely.

    If you want to allow the user to create non-default post-install configurations where the apps are in different locations, add an app.info file for your C# app where the user can specify the location of the CLI app if it’s not in the same folder as the UI.

    I’m not aware of any easy way to specify two different locations in an installer and use them to dynamically create/modify an app.info file. If you need that I think you’ll need to write a custom config app that’s called by the installer to create the app.info file.

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

Sidebar

Related Questions

I have made an application in android that lets the user compress and decompress
I have made an application that gives the user the option to open up
I have a Silverlight Application (3.0) that I have made changes to in Visual
i have an windows application that i have made by visual studio 2008.this application
I have an asp.net web application that I made in Visual Studio 2008. Everything
I have a Setup Project that I made using Visual Studio 2010. The application
I am developing a command line application that creates a full Visual Studio 11
Visual Studio 2010 Express, Windows Forms. Have made myself my first little application which
I have made an application which uses latest ios facebook sdk to connect. I
I have made an application project in Visual Studio 2008 C#, SQL Server from

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.