Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

Thanks guys, i thought of using AutoIt functionality instead of PSexec, which would be easier.

REgarding run a client programe continuesly, I dont think I will get a permission for this.

Thanks...

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
×
×
  • Create New...