Problems with using Command Line in automation

I am trying to get Toad Data Point to run a batch file which is located and runs on a remote machine. I am using PowerShell tools to do so. So if I type ‘psexec \[Server Name]\C$\hds\RUNME.bat’ into a command prompt then it runs successfully (running the batchfile on the remote machine).

When I copy this command into a batch file on my local machine and call it using ‘Run’ in TDP automation it keeps failing saying PsExec is not recognised and an internal or external command.

I have tried multiple variations using the full command line to psexec, trying to luanch psexec directly in TDP automation and even mapping a drive to my remote machine but they all fail in a similar way.

Does anyone have an idea how I can achieve this? I’m convinced it’s a syntax thing but I’m completely baffled.

Fear not! I’ve managed to fix this myself. In TDP just enter the path and name of a batch file on your local machine. The syntax for the batch file is as follows:

C:\Windows\Sysnative\PsExec.exe \[SERVERNAME] C:\hds\RUNME.bat

Apparently this then chooses the appropriate PsExec (32 bit or 64) as needed.

As usual ‘Google is your friend’ :slight_smile:

have you tried specifying the path to psexec? i.e. C:\FolderName\subFolder\psexec and put the \[Server Name]\C$\hds\RUNME.bat on the argument line.