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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:27:24+00:00 2026-06-17T11:27:24+00:00

I have a console application that asks for a SourcePath when started.. when I

  • 0

I have a console application that asks for a SourcePath when started.. when I enter the Source Path, It asks for DestinationPath… when i enter DestinationPath it starts some execution

My Problem is to Supply these path via a windows application, means i need to create a window form application that will supply these parameters to the console application automatiocally after certain time interval

can it be achieved or not… if yes, plese help… its very Urgent…

ohh..
I have tried a lot of code that i can not paste hear all but some that i use to start the application are…

        ProcessStartInfo psi = new ProcessStartInfo();
        psi.FileName = @"C:\Program Files\Wondershare\PPT2Flash SDK\ppt2flash.exe";
        psi.UseShellExecute = false;
        psi.RedirectStandardError = true;
        psi.RedirectStandardInput = true;
        psi.CreateNoWindow = false;
            psi.Arguments = input + ";" + output;
        Process p = Process.Start(psi);

and

        Process process = new Process
        {
            StartInfo = new ProcessStartInfo
            {
                CreateNoWindow = true,
                FileName = @"C:\Program Files\Wondershare\PPT2Flash SDK\ppt2flash.exe",
                RedirectStandardError = true,
                RedirectStandardOutput = true,
                UseShellExecute = false,
            }
        };
        if (process.Start())
        {
            Redirect(process.StandardError, text);
            Redirect(process.StandardOutput, text);
            MessageBox.Show(text);
        }
    private void Redirect(StreamReader input, string output)
    {
        new Thread(a =>{var buffer = new char[1];
            while (input.Read(buffer, 0, 1) > 0)
            {
                output += new string(buffer);
            };
        }).Start();
    }

but nothing seems to be working

  • 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-17T11:27:25+00:00Added an answer on June 17, 2026 at 11:27 am

    You can add parameters to your ProcessStartInfo like this:

     ProcessStartInfo psi = new ProcessStartInfo(@"C:\MyConsoleApp.exe",
         @"C:\MyLocationAsFirstParamter C:\MyOtherLocationAsSecondParameter");
     Process p = Process.Start(psi);
    

    this will startup the console app with 2 parameters.
    Now in your console app you have the

     static void Main(string[] args)
    

    the string array args is what contains the parameters, now all you have to do is get them when your app starts.

    if (args == null || args.Length < 2)
    {
        //the arguments are not passed correctly, or not at all
    }
    else
    {
        try
        {
            yourFirstVariable = args[0];
            yourSecondVariable = args[1];
        }
        catch(Exception e)
        {
            Console.WriteLine("Something went wrong with setting the variables.")
            Console.WriteLine(e.Message);
        }
    }
    

    This may or may not be the exact code that you need, but at least will give you an insight in how to accomplish what you want.

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

Sidebar

Related Questions

I have a .NET console application that needs to generate some HTML files. I
I have console application. In that i have some process that fetch the data
I have a console application that starts up, hosts a bunch of services (long-running
I have a small console application, that asks for a values to count with
I have a Windows console application that returns some text. I want to read
I have a console application that references third party libraries whose source code I
I have console application that hangs during execution. Here is my configuration: cfg.setProperty(hibernate.connection.driver_class, com.mysql.jdbc.Driver);
I have a console application that runs some temperamental hardware. If I don't detach
Its quite weird,i have a console application that reads media file and extract some
I have a console application that I didn't write. Is there some easy way

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.