Run an EXE
-
You should be able to run the executable through System.Diagnostics.Process, however you need enough permissions to do this. You may want to run your website in impersonate mode and require a login for your website. I would not recommend this though... Maybe explain us what you want, then someone may come with a better solution?
.: I love it when a plan comes together :. http://www.zonderpunt.nl
-
My requirement is to run an EXE in remote system. Consider my application is in 'System A' and EXE is in 'System B'. Now i have to run the EXE in System B. How to do this. I am using ASP.Net with C# I am working in this for last two days, still didnt got any solutions. I have already tried with 'System.Diagnostics.Process', I can able to run locally but cant able to run in Remote system. System B is not a client system. Its a separate remote system. Where files be stored. I have just to trigger the EXE their. Any solution/steps/code will be more helpful. Thanks in advance.
when you want to execute the exe ? after a specific time or after any specific operation ?
cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net View My Recent Article
-
This sounds like something that could be solved with a webservice. The webservice could "listen" for things like, start, stop, progress commands. You could then have one machine send these commands to the webservice. Just a suggestion.
Since you don't have much experience with WebServices, and you speak about System B having files stored. You might find this an interesting approach. The FileSystemWatcher class allows you to monitor a folder for changes and based on some type of change, your application can take action. The idea being that System A could write a small file in a folder that System B is watching. When System B sees the change, it runs whatever logic is necessary. The only thing that you require is that System A can write to a shared folder on System B. Two good articles to show you how this works .. CodeProject: Watching Folder Activity in VB.NET[^] MSDN: FileSystemWatcher Class[^]
-
My requirement is to run an EXE in remote system. Consider my application is in 'System A' and EXE is in 'System B'. Now i have to run the EXE in System B. How to do this. I am using ASP.Net with C# I am working in this for last two days, still didnt got any solutions. I have already tried with 'System.Diagnostics.Process', I can able to run locally but cant able to run in Remote system. System B is not a client system. Its a separate remote system. Where files be stored. I have just to trigger the EXE their. Any solution/steps/code will be more helpful. Thanks in advance.
do you have LAN connection from System A and System B...(both servers) If so, pass UNC path to the System.Diagonistic.Process to run the exe with UserId and Password criteria. But Mind that, the process with run in your machine by this process. If you want to run on System B, invoking the process from System A is not possible. You need to find some way say windows service or something that may invoke your process when some action is taken by System A.
Abhishek Sur My Latest Articles Working with Excel using MDAC
Basics on LINQ and Lambda Expressions
Create .NET Templates -
Since you don't have much experience with WebServices, and you speak about System B having files stored. You might find this an interesting approach. The FileSystemWatcher class allows you to monitor a folder for changes and based on some type of change, your application can take action. The idea being that System A could write a small file in a folder that System B is watching. When System B sees the change, it runs whatever logic is necessary. The only thing that you require is that System A can write to a shared folder on System B. Two good articles to show you how this works .. CodeProject: Watching Folder Activity in VB.NET[^] MSDN: FileSystemWatcher Class[^]
-
when you want to execute the exe ? after a specific time or after any specific operation ?
cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net View My Recent Article
-
My requirement is to run an EXE in remote system. Consider my application is in 'System A' and EXE is in 'System B'. Now i have to run the EXE in System B. How to do this. I am using ASP.Net with C# I am working in this for last two days, still didnt got any solutions. I have already tried with 'System.Diagnostics.Process', I can able to run locally but cant able to run in Remote system. System B is not a client system. Its a separate remote system. Where files be stored. I have just to trigger the EXE their. Any solution/steps/code will be more helpful. Thanks in advance.
Which of these machines is the server for this ASP.NET application ? If B, then it's trivial. If A, then it's not possible, with ASP.NET.
Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
-
This is ONLY possible, if machine B is your server, or you have a way of communicating to machine B from the server. Machine B needs to be a webserver of some sort, or on the same network as your server, for this to be possible. You need to provide more information to get your solution, and it may be that you can't do it ( it usually is when people ask how to run an exe, but they usually want to run it on the client )
Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
-
Thanks for the suggestion David, can you give me some ideas how can i do it with web services. I am not much familiar with web services.
ya, you can use webservice to run a exe on a remote machine. Write a simple webservice which calls your executable and deploy it on the machine which has the exe. But for that you need to make that machine also as a server.
Education is not a way to escape poverty — it is a way of fighting it.
-
Which of these machines is the server for this ASP.NET application ? If B, then it's trivial. If A, then it's not possible, with ASP.NET.
Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp