Click here to Skip to main content
15,884,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have a batch file on my Server on D drive.

I have a .net windows application and i want to execute that batch file on server itself.

I have tried process.start method but the execution happens on my machine. i don't want that batch to execute on my machine instead i want it to execute on server itself.


Can some help me providing the Code for doing the same.


Thanks in advance.
Posted

1 solution

Refer-

1. Create a Remote Process using WMI in C#[^].

2. How to execute a bat file on remote server?[^]
Quote:

You can execute commands on remote machines using PsExec. I use it to execute batch files and pass parameters to them.

 
Share this answer
 

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