how to send a batch file through UDP and execute in remote machine ?

Hi experts,

        I want to  send a batch file through UDP and execute the batch file in remote machine.
        This application has to be written in c#. How to do it ??

Thanks. Urgent !!!
Who is Participating?
oobaylyConnect With a Mentor Commented:
Writting direct via UDP means you'd have to have an application listening on the remote machine, which is opening a massive can of worms.
Simplest option is to connect to the remote machine's administrative network share, write the batch file there. Then you can use the Win32_ProcessStartup WMI method to execute the command on the remote machine. You will of course need administrative access to the remote machine & if it's got windows firewall running, you'll need to open it up for the remoteadmin service.
srk1982Author Commented:
Hi oobayly,

           What is the maximum size limit for the messages i can send via UDP ??
           I mean Bytes[???].
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.