Click here to Skip to main content
15,900,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI,

I have windows application exe file which is located in server machine inside web appication folder. When I click the link button in gridview of web browser, then windows form exe file must be opened.

Below is the code:
if (e.CommandName == "EditRow")
{
System.Diagnostics.Process RunProcess = new System.Diagnostics.Process();
RunProcess.StartInfo.CreateNoWindow = true;
RunProcess.StartInfo.UseShellExecute = true;
RunProcess.StartInfo.WorkingDirectory = Request.MapPath("~/Folder/");
RunProcess.StartInfo.FileName = "Application.exe";
RunProcess.StartInfo.Arguments = "MyArgument";
RunProcess.Start();
}

It is running successfully in localhost, but not working in client machine through server. Please help me on this.

Thanks
Posted
Updated 4-Dec-14 22:14pm
v3

1 solution

C#
function Launch() {
var launcher = new ActiveXObject("Shell.Application");
launcher.ShellExecute("where_is_your_exe\\file.exe", "<%=userId%>", "", "open", "1");
}


and also change the security configuration in explorer to run activeX.
 
Share this answer
 
Comments
SukirtiShetty 5-Dec-14 5:22am    
Hi,

Here <%=userid%>, what userid I have to add? Please tell me.
SukirtiShetty 5-Dec-14 23:01pm    
Hi,
Anybody please help me on this. I am stuck on this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900