Click here to Skip to main content
13,446,408 members (35,821 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Below is my requirment-

I want to run two .bat file in remote machine using C#.Net. This two .bat file residing at remote machine.Like-
1. C:\aa\aa.bat and
2. D:\bb\bb.bat
After successfull run of aa.bat file, bb.bat file will be started and getting message after successful run.

Can someone please provide me the code? It's very urgent.
Posted 18-Nov-12 3:16am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

If you have access to the remote machine, and can reach and execute the files, then you can do it with Process.Start[^]

However, it will run the files on your machine, not on the remote machines processor, and at whatever privilege level and access rights your connection is permitted, no more. There are all sorts of things which are designed to prevent your running programs on other machines - firewalls for one.
ProgramFOX 18-Nov-12 10:11am

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03-2016 | 2.8.180314.2 | Last Updated 18 Nov 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100