Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
3.00/5 (3 votes)
Hi.
I have created an ASP application, there I need to run a .exe and send it some parameters, right now I'm able to do this with process.start() but just when I'm in debugging mode (Directly from Visual Studio).
I have been reading a little and I found that for security reasons I'll not be able to do this...
Is there any way to perform this? like a script or something?
The principal problem is that I need to send parameters to the .exe
Thanks in advance

Note: This is for an Intranet Site in my job, and it's absolutely necessary to do this.
Posted
Updated 8-Aug-12 11:42am
v2
Comments
Christian Amado 8-Aug-12 17:19pm    
Absolutely. You should never do that! What does your "clients" think about their compromised security?
EddyGuzman 8-Aug-12 17:41pm    
It's an intranet site, it's absolutely necessary to do this.
Christian Amado 8-Aug-12 17:49pm    
Remember that you have limited access to the client machine. You can try with System.Diagnostics.Process...
Sergey Alexandrovich Kryukov 8-Aug-12 18:37pm    
System.Diagnostics.Process? What are you event talking about? Well, it will run -- on the server host.
--SA
Christian Amado 8-Aug-12 18:58pm    
A class. http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx

1 solution

Your 2 major choices are write an AX object to call it, or an NPAPI plugin to do it ... as others have said, that creates a gaping security hole, so engineer the plugin/ax to ONLY call the known exe - I'd CRC check it too if I were you

You mention it's written in delphi - you may be lucky, delphi creates IDispatch objects left, right and centre - have a look at the exe with oleview.exe - you may find something in there you can directly invoke via script (in IE only) via ActiveXObject[^]
 
Share this answer
 
Comments
EddyGuzman 9-Aug-12 18:28pm    
Thanks this worked perfect...I know that what I did wasn't the best approach but it helps me for the moment...I just changed the security configuration in explorer to run activeX, it isn't really harmful because our network is protected (Except for the manager and me, No one else can add files to the Network folder in where the exe is located). As you said I made the ax to call only the known exe...Thanks a lot, and sorry for the delay in my response
neerajkumarmodi 14-Feb-13 3:34am    
Can you share how you are running exe on web application
EddyGuzman 20-Feb-13 19:52pm    
function Launch() {
var launcher = new ActiveXObject("Shell.Application");
launcher.ShellExecute("where_is_your_exe\\file.exe", "<%=userId%>", "", "open", "1");
}

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