0

I got a web site with a link called 'Open Trim' which should open an application on local PC called Trim.exe. When I run the website on my local PC it works fine. I click the link 'Open Trim' and the Trim.exe application opens. But, when I upload the same code to the Windows 2003 server the link doesn't do anything.

I have seen in github.com website where you could open a GitHub desktop application by clicking the link 'Clone in Desktop'. I am trying to achieve similar feature with my website and Trim.exe.

enter image description here

I am using the following code.

 var p = new Process { StartInfo = { UseShellExecute = false, RedirectStandardOutput = true, FileName = path + openTrimBatchFileName } }; p.Start(); p.StandardOutput.ReadToEnd(); p.StartInfo.CreateNoWindow = true; p.WaitForExit(); 

Reference: how run exe file in c#

6
  • Your user has to download the EXE and execute it, if they want it to run on their machine. Commented Aug 9, 2013 at 4:25
  • I think it does exactly what you ask from it. It would start the application on the same device that that code is executed on. I.E the server. Whatyou want is, the server to execute an application on the client, right? Commented Aug 9, 2013 at 4:32
  • @RobertHarvey I have update the question as requested. Commented Aug 12, 2013 at 0:14
  • Clone in Desktop works by the desktop app installing a URL handler. The browser doesn't run arbitrary code on the client computer, it just hands the URL over to an already installed app. Commented Aug 12, 2013 at 0:24
  • @JoeyRoosing yes I want the server to execute an application on the client PC. How? Commented Aug 12, 2013 at 1:00

1 Answer 1

2

The code you mentioned will make the exe to run on server machine. That's why it is working on your local PC. Your client machine would have to download the exe than have to run on their machine. SO instead of this code, you have to give the link so that users can download the exe and then run it.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.