Jump to content

Need to invoke a batch process in external computer


Recommended Posts

Hi,

I need to invoke a batch process in another computer. I am trying to use RUNAS or RUNASWAIT command with no use, what could be the mistake I am doing.

Code

$Server = "server1"
$ServerUser = "domain\user1"
$ServerPassword = "pswd1"
$ServerBatFilePath = "C:\Application\Launch"
$ServerBatFile = "GUIAutomation.bat"

$EnvGetPasswordStatus = RunAsWait($ServerUser, $Server, $ServerPassword, 0, $ServerBatFile, $ServerBatFilePath)

And while specifying $ServerUser do I have to give the Domain name or not.

Example

$ServerUser = "Doaminname\Username"

Is there any other way of doing it.

Thanks

Sasikumar

Link to comment
Share on other sites

This probably isn't the other way you are looking for, but you could use TCP to transfer commands or files to a remote computer. The only problem is you have to run a client program on the other computer. If it is ok to run a client program on the remote computer, you can set up a listening port, connect to it, and receive any information that you want from the sender. I have a file transfer app in my sig. That should get you started on TCP.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...