We are using the code below to test running a batch file from workflow. the script builds and appears to run properly, however it never executes. We actually would like this to run on another server on the network, but simplified to the local LF server when we saw the same results with the network path to the .bat file. We are seeing no errors or messages when running the script.
Imports System Imports System.Diagnostics Imports System.Collections.Generic Imports System.ComponentModel Imports System.Data Imports System.Data.SqlClient Imports System.Text Namespace WorkflowActivity.Scripting.Script3 Public Class Script1 Inherits ScriptClass90 Protected Overrides Sub Execute() Dim process As New Process() Try ' Configure process settings process.StartInfo.UseShellExecute = False process.StartInfo.RedirectStandardOutput = True process.StartInfo.FileName = "C:\WO_Test\sendmaterial.bat" ' Start the process process.Start() ' Wait for the process to exit process.WaitForExit() Finally ' Make sure to dispose of the process process.Dispose() End Try End Sub End Class End Namespace