I’m writing a c# application which connects to a remote server for doing stuff.
I’m already able to copy files to the client, and what I wish to do now, after I finished copying all the files is send a “command signal” through my Socket, and make the client run it.
Just for the example, this is what I wish to do:
string cmD = @"\\192.168.0.1\\cmd";
byte[] clientData = new byte[8000];
clientData = System.Text.Encoding.UTF8.GetBytes(cmD);
clientSock.Send(clientData);
Let’s assume that clientSock is the static Socket connected to my server.
In this case, I would like to run “cmd” on the client side.
Any ideas?
In the end, you have not asked anything. Could you please detail what exactly would you like to ask?
Anyway, I guess you are trying to run a command in the remote server so, you will have to implement it in your C# server. To run commands, you can use
Process::Start()method. Good luck!Cheers,