cancel
Showing results for 
Search instead for 
Did you mean: 

Call exe from addon

dilipkumbhar
Participant
0 Kudos

I am using SAP B1 9.2. I am calling an exe , but it is giving error as,

Sales_Report has stopped working.

If I run the exe independently, then it executes. But it gives problem when executed through addon.

This is my code,

 Private Sub ExecuteFile()
        Dim objReport As New Process()
        Try           
            objReport.StartInfo.FileName = "C:\MMCPL Data\Addons\Parameter\Sales_Report.exe"           
            objReport.StartInfo.UseShellExecute = True
            objReport.StartInfo.RedirectStandardOutput = False            
            objReport.Start()            
        Catch ex As Exception
            WriteLog(SBO_Application.Company.ServerDate & ":" & SBO_Application.Company.ServerTime & ":" & "ExecuteFile()=" & ex.Message & vbNewLine & "Line=" & ex.StackTrace)
        End Try       
    End Sub

Accepted Solutions (0)

Answers (0)