How to add a windows application to a shared add-in? RRS feed

  • Question

  • Hi,

      I want to call an windowsapplication.exe  in the button_click event from the shared Add-in created..


      Any inputs will be helpful.

    • Changed type venturert Thursday, July 21, 2011 4:25 AM
    Thursday, July 21, 2011 4:15 AM


  • Finally I succeeded.

    Steps I did:

    1.   Put the exe file into the folder where your addin.dll locates(Debug/Release).

    2.   In the button click function add the following code:

                   System.Diagnostics.Process proc = new System.Diagnostics.Process();

                   string location= this.GetType().Assembly.Location.Trim(<char array>);

                   proc.StartFileInfo.Filename=location+ "Test.exe";


            Note: Since the location variable will fetch the path along with addin.dll, we are trimming the dll file to get the location alone where our .exe file is stored.


    Any other simpler steps than these also recommendable and do post here.

    • Marked as answer by venturert Thursday, July 21, 2011 10:37 AM
    Thursday, July 21, 2011 10:37 AM