Command Line Job popup handling

I’m trying to deploy a new version of 3ds max 2016 in the office using the command line job.
Basically I have the deployment package on the network and I wrote a batch file for Deadline to run.

START "" /W "\\CICADA-DC\Projects\Deployment_2016\3dsMaxDesign2016\3dsMax2016.lnk"

Locally it runs fine, and initially it seems to run fine through deadline. That is until the additional Visual C++ starts to install at which time the job fails. It seems to me that the error is caused by the popup itself and not any actual error with the installation. I know at least in 3ds Max there is a way to specify which popups to ignore. Is there a way to do the same for Command Line jobs? or a way to set Deadline to ignore all popups for any command line jobs?

Here is the job error log

[code]=======================================================
Error

Dialog popup detected: Title “Installation Progress”, Message “Please wait while installing Microsoft Visual C++ 2012 Redistributable (x86)…”
at Deadline.Plugins.ScriptPlugin.RenderTasks(String taskId, Int32 startFrame, Int32 endFrame, String& outMessage, AbortLevel& abortLevel)

=======================================================
Type

RenderPluginException

=======================================================
Stack Trace

at Deadline.Plugins.Plugin.RenderTask(String taskId, Int32 startFrame, Int32 endFrame)
at Deadline.Slaves.SlaveRenderThread.RenderCurrentTask(TaskLogWriter tlw)

=======================================================
Log

2016-01-05 12:37:19: BEGIN - B132577A\render
2016-01-05 12:37:19: 0: Start Job timeout is disabled.
2016-01-05 12:37:19: 0: Task timeout is disabled.
2016-01-05 12:37:19: 0: Loaded maintenance job: Deploy Max 2016 (568b002bdb2df40bbc06937f)
2016-01-05 12:37:19: 0: INFO: Executing plugin script C:\Users\render\AppData\Local\Thinkbox\Deadline7\slave\b132577a\plugins\568b002bdb2df40bbc06937f\CommandLine.py
2016-01-05 12:37:19: 0: INFO: About: Command Line support for Deadline
2016-01-05 12:37:19: 0: INFO: The job’s environment will be merged with the current environment before rendering
2016-01-05 12:37:19: 0: Plugin rendering frame(s): 0
2016-01-05 12:37:19: 0: INFO: Stdout Redirection Enabled: True
2016-01-05 12:37:19: 0: INFO: Stdout Handling Enabled: True
2016-01-05 12:37:19: 0: INFO: Popup Handling Enabled: True
2016-01-05 12:37:19: 0: INFO: QT Popup Handling Enabled: False
2016-01-05 12:37:19: 0: INFO: WindowsForms10.Window.8.app.* Popup Handling Enabled: False
2016-01-05 12:37:19: 0: INFO: Using Process Tree: True
2016-01-05 12:37:19: 0: INFO: Hiding DOS Window: True
2016-01-05 12:37:19: 0: INFO: Creating New Console: False
2016-01-05 12:37:19: 0: INFO: Running as user: render
2016-01-05 12:37:19: 0: INFO: Executable: “\CICADA-DC\Projects\Deployment_2016\3dsMaxDesign2016\deploy.bat”
2016-01-05 12:37:19: 0: INFO: Argument:
2016-01-05 12:37:19: 0: INFO: Startup Directory: “\CICADA-DC\Projects\Deployment_2016\3dsMaxDesign2016”
2016-01-05 12:37:19: 0: INFO: Process Priority: BelowNormal
2016-01-05 12:37:19: 0: INFO: Process Affinity: default
2016-01-05 12:37:19: 0: INFO: Process is now running
2016-01-05 12:37:19: 0: STDOUT: ‘\CICADA-DC\Projects\Deployment_2016\3dsMaxDesign2016’
2016-01-05 12:37:19: 0: STDOUT: CMD.EXE was started with the above path as the current directory.
2016-01-05 12:37:19: 0: STDOUT: UNC paths are not supported. Defaulting to Windows directory.
2016-01-05 12:37:19: 0: STDOUT: C:\Windows>START “” /W “\CICADA-DC\Projects\Deployment_2016\3dsMaxDesign2016\3dsMax2016.lnk”
2016-01-05 12:37:30: 0: WARNING: Detected popup dialog “Installation Progress”.
2016-01-05 12:37:30: 0: WARNING: ---- dump of dialog ----
2016-01-05 12:37:30: 0: WARNING: Button: Cancel
2016-01-05 12:37:30: 0: WARNING: msctls_progress32:
2016-01-05 12:37:30: 0: WARNING: Static: Please wait while installing Microsoft Visual C++ 2012 Redistributable (x86)…
2016-01-05 12:37:30: 0: WARNING: Static:
2016-01-05 12:37:30: 0: WARNING: ---- end dump of dialog ----

=======================================================
Details

Date: 01/05/2016 12:37:32
Frames: 0
Elapsed Time: 00:00:00:14
Job Submit Date: 01/04/2016 18:28:15
Job User: ifloussov
Average RAM Usage: 4249591040 (13%)
Peak RAM Usage: 4311564288 (13%)
Average CPU Usage: 3%
Peak CPU Usage: 6%
Used CPU Clocks: 105653
Total CPU Clocks: 3521760

=======================================================
Slave Information

Slave Name: B132577A
Version: v7.2.0.18 R (79a3ddcab)
Operating System: Windows 7 Professional (SP1)
Running As Service: No
Machine User: render
IP Address: 192.168.10.140
MAC Address: 00:30:48:F4:35:60
CPU Architecture: x64
CPUs: 24
CPU Usage: 3%
Memory Usage: 3.9 GB / 32.0 GB (12%)
Free Disk Space: 15.421 GB
Video Card: Standard VGA Graphics Adapter
[/code]

If you open up the following file: “<your_repo>/plugins/CommandLine/CommandLine.py” and look for the function called: “InitializeProcess”, you could disable popup handling completely (not a great idea) or handle the pop you are encountering by ignoring it. Here’s how you would do that.

[code] def InitializeProcess(self):
# Set the plugin specific settings.
self.SingleFramesOnly = False

    # Set the process specific settings.
    self.StdoutHandling = True
    self.PopupHandling = True #you could set this to False, again, not the best idea in the world, but will probably be ok this time round...but what about a different job you send it next time, which might need a button clicking, etc?

    self.AddPopupIgnorer( "Installation Progress" ) #add this line here to the "InitializeProcess" function[/code]

Thanks for your help, that worked.
I just temporarily disabled it for this job because I didn’t want to keep track of all the popups that come up during the installation process.