How can i run .bat on all machines through deadline

i have created a folder which includes all free download plugins.

I have created a folder in network something like M:\3dsMax2011_install_template\network\plugins\

i created a .bat the content like this

xcopy “M:\3dsMax2011_install_template\network\plugins*” “C:\Program Files\Autodesk\3ds Max 2011\plugins” /s /i /r /y
xcopy “M:\3dsMax2011_install_template\network\Plugin.UserSettings.ini” “C:\Program Files\Autodesk\3ds Max 2011” /s /i /r /y
xcopy “M:\3dsMax2011_install_template\network\Plugin_3dsmaxTeam_Local.ini” “C:\Program Files\Autodesk\3ds Max 2011” /s /i /r /y

this can run successfully.

But when i go to deadline, select a rendernode, then right click Remote Control>Execute Command, and fill in M:\3dsmax_update.bat
(M:\ is a map network drive, and i am using a user account with administrative rights), deadline nothing happens

Then i go to Submit Command Script Job to Deadline,

click the insert File Path button, the startup Directory is M:\

deadline says

0: INFO: StartJob: initializing script plugin CommandScript
0: INFO: About: Command Script support for Deadline
0: Plugin rendering frame(s): 0
0: INFO: Checking line:“M:\3dsmax_update.bat”
0: INFO: Executable found: M:\3dsmax_update.bat
0: INFO: Arguments found:
0: INFO: Stdout Handling Enabled: False
0: INFO: Popup Handling Enabled: False
0: INFO: Using Process Tree: True
0: INFO: Hiding DOS Window: True
0: INFO: Creating New Console: False
0: INFO: Render Executable: “M:\3dsmax_update.bat”
0: INFO: Render Argument:
0: INFO: Startup Directory: “M:”
Scheduler Thread - Render Thread 0 threw an error:
Scheduler Thread - Exception during render: An error occurred in RenderTasks(): Render executable returned from RenderExecutable(), “M:\3dsmax_update.bat”, does not exist.

How can i send a .bat task through deadline to tell all machines in deadline do the same thing

Hi,
A couple of things are going wrong here…

  1. Remote execute commands require a prefix of “cmd /c” to work. ie:

cmd /C “Y:\test.bat”

or to get windows explorer to open on each machine (if its user logged in…):

explorer.exe “c:”

  1. For the command script job, I believe you need to either replace any “” with “\” or use a “/” instead. Any spaces in the path should be handled by wrapping the path in “”.

HTH,
Mike

this does not work

Hi

I’ve always used sysinternals psexec for executing almost identical scripts.

But to get them to work I have to explicitly map the network drive in the bat file, even though the machines are logged in with a user with admin rights and the network drives are mapped.

It’s a simple addtional line in your bat file before the xcopy commands, eg

net use m: \x.x.x.x\folder /user:administrator password

It may be worth a try?

not neccessarily…
i command execute this through DL monitor

cmd /C start “robocopy” “\server\deadline\Robocopy.exe” \server\deadline_addons\ C:\ /COPYALL /s /e /w:1 /r:1

this works so simple.

cmd /C start “path to bat” usually works fine when the drive is mapped already. There was no need for me to map the drive again in the bat or command.