Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

How to execute Console app as EXE and get Success or Failure as 0 or 1

$
0
0

Hi,

I am using Visual Studio 2008 and created new "Integration Services Project".

I have one SSIS Package where I need to add one Task to execute one EXE File, which is a separate exe which is developed using VS 2010 as Console Application. So I need to execute that Console Aplication's EXE File, by passing Argument as 1, and also need to know if it was executed successfully and need to return 0 or 1 from that Console Application to SSIS Package so that SSIS Package can know if that was executed successfully then go ahead.

I tried adding "Execute Process Task" but somehow could not understand how to return Value from that Console App to SSIS and also when it executes that task, it displays that Console App Window. I looked some sample code but could not find how to read success or failure value from that executable Console app. 

Can someone help me for two things?

1. how do I get return code from console app to SSIS Package and also if there is any error, want to stop process.

2. Also, it always returns error message "Error: 0xC0029151 at Execute Process Task, Execute Process Task: In Executing "C:\MyFolder\MyExe.exe" "1" at "C:\MyFolder", The process exit code was "-1073741510" while the expected was "0"." Not sure why.

Thanks in advance


Nirav



Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>