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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:01:54+00:00 2026-06-04T00:01:54+00:00

I am trying to invoke one wpf application from another wpf application. The invoking

  • 0

I am trying to invoke one wpf application from another wpf application.
The invoking wpf application makes the call

ProcessStartInfo BOM = new ProcessStartInfo();

BOM.FileName = @"D:\WPFAPPLICATION.exe";

BOM.Arguments = temp;

Process.Start(BOM);

Now in the invoked application, I try to retrieve the argument passed using

  string arguments =Process.GetCurrentProcess().StartInfo.Arguments;

However the arguments are not passed. why is this??

I also tried an alternative method where in:

    public partial class App : Application
    {
    public static String[] mArgs;

    private void Application_Startup(object sender, StartupEventArgs e)
    {

        if (e.Args.Length > 0)
        {
            mArgs = e.Args;


        }
    }
    }
    }

However this did not work either!!!
Please HELP!!

  • 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-04T00:01:55+00:00Added an answer on June 4, 2026 at 12:01 am

    Well I finally found a solution to my question if anyones interested.
    While in the calling application I maintained the same code I previously used:

    ProcessStartInfo BOM = new ProcessStartInfo();
    BOM.FileName = @"D:\WPFAPPLICATION.exe";
    BOM.Arguments = temp;
    Process.Start(BOM);
    

    In the called application in order to receive arguments successfully I simply had to :

        System.Text.StringBuilder strbuilder= new System.Text.StringBuilder();
    
    
        foreach (String arg in Environment.GetCommandLineArgs())
        {
            strbuilder.AppendLine(arg);
            barcode = arg;
        }
        psnfo = strbuilder.ToString();
    

    I was not handling the arguments passed to the process in the correct manner

    so upon displaying psnfo

    The code returns :

     D:\WPFAPPLICATION.exe temp
    

    Source : http://www.codeproject.com/Questions/386260/Using-process-start-in-a-wpf-application-to-invoke

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

Sidebar

Related Questions

I am trying to invoke a private method belonging to one class from another
I'm currently trying to invoke a web service from a web application that I've
I have 2 dijit widget template classes and am trying to call one from
I am trying to invoke an internal method from a dynamically generated one. The
I have been trying to invoke my application from browser on android 3.1 (Honeycomb)
I am trying to invoke an ANT target from Windows (right-click) file context menu.
Hi I am trying to Encrypt a string to invoke a web service from
How can I invoke a service directly from a view? I'm trying with ${my.domain.service.method}
Maybe I am trying the impossible... I have created a wpf application to start
I'm very new to WPF and am writing an application using this example as

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.