Remote execution of a batch file by UFT

  • Questions
  • Remote execution of a batch file by UFT
Question ID: 105941

I want to be able to kick off a batch file on a remote machine by using UFT so that it runs during part of a test. The machine I want to run the batch file on doesn’t have UFT so I’m not sure how to pull this off.

Marked as spam
Posted by (Questions: 227, Answers: 22)
Asked on February 18, 2015 7:25 pm
Answers (2)
Private answer

You can read its answer here [systemtools][1]


Marked as spam
Posted by (Questions: 0, Answers: 1)
Answered on February 20, 2015 8:42 am
Private answer

Well, it would be easier if you had UFT installed on the remote machine, then you could use UFT's Automation Model to remotely execute the script which would run a SystemUtil.Run ''batchfilename.bat'' or something similar.

I did find an article that talks about using WMI events to kick off remote files like in this example:

This example runs the batch file C:test.bat located on the remote computer TEST-MACH1.

strComputer = ''TEST-MACH1''
Set objWMIService = GetObject(''winmgmts:\'' & strComputer & ''rootcimv2:Win32_Process'')
objWMIService.Create ''C:test.bat'', null, null, intProcessID

You can find a lot of more details if you are interested on this website:

Of course, this is not an officially supported solution, so your success may be limited and you would be on the hook for supporting your code that you use.

Good luck.

Marked as spam
Posted by (Questions: 2, Answers: 477)
Answered on February 18, 2015 7:31 pm