Windows run remote batch file, how to do this?

Asked By 0 points N/A Posted on -
qa-featured

Hi Experts,

Apparently I am new to this sort of  a thing, but it is needed. Is there any software needed to do this and better, to use it automatically? If not   please place a step by step direction in configuring windows run remote batch file

SHARE
Best Answer by Austin kelley
Best Answer
Best Answer
Answered By 0 points N/A #139151

Windows run remote batch file, how to do this?

qa-featured

Hi,

There are some tools that allow you to do this. Like WinRShd and DoIt. Below I will give you step by step instruction on how to launch a batch file remotely in another windows computer.

1. Target (\targetMachine1) pc must have allowed remote connections (-NDMyself)
2. Suppose login as “test” and password as “password” in the target machine.
3. test1.bat is the batch file you need to run remotely


set machine=targetMachine1
set file=\eici01userFMAtest1.bat
set user=test
set userPwd=password
set executeAs=%user%
set executeAsPwd=%userPwd%
schtasks /Create /S %machine% /U %user% /P %userPwd% /RU %executeAs% /RP %executeAsPwd% /SC ONCE /TN install /TR %file% /ST 00:00:00
schtasks /Run /S %machine% /U %user% /P %userPwd% /TN install
pause

Answered By 0 points N/A #139152

Windows run remote batch file, how to do this?

qa-featured

 

Hi,


It is not too hard to run the remote batch file. Just A server application is needed which runs on the remote computer. You also need a Tcplistner to accept a connection from a client. Then follow processes given below.


1. Create a socket and take a simple string from the client.
2. Execute string with the process class.
3. Send a success or failure notice to the client.


If you have security priority, you should use encryption.

Login/Register to Answer

Related Questions