Call a process in a .NET add-in

  • Thread starter Thread starter kellyxie
  • Start date Start date
K

kellyxie

Hello all,

I am working on an Add-in to the .NET framework using C#. I need to
call another .exe file in my application.

Right now I can only make it work using the absolute path for that
exe file like this way:

myProcess.StartInfo.FileName = "C:\\Documents and
Settings\\user\\translator.exe";

However I want others to be able to use this add-in in other
computers. Where shall I put this .exe file? What path shall I
provide in the code?

I am very green in this field. Thanks a lot for your help.

Kelly
 
Hello Kelly,

You can determine the path of your exe file if you include it in the
installer for your add-in. Then, you can have it install anywhere you want
it (within reason, of course) and not have to worry about guessing the
location.

HTH,

Kyril
 
Hello Kyril,

Thanks a lot for your reply. Can you explain a bit more how to include
it in the installer?

There are 2 folders created when I first created the add-in. Do you
mean the set up folder? I just add the .exe to it and chaned the code
to
myProcess.StartInfo.FileName = "translator.exe";
but it said it couldn't find the file.

Thanks,
Kelly
 
Back
Top