I'm reasonably new to SSIS in SQL 2005 and have limited knowlege of scripting .bat files. My problem is that we have a scheduled task on a remote server that I need to kick off from a SSIS Script Task and I need to know it completes successfully before I continue to the next steps. The scheduled task runs successfully on the remote server and I can also successfully run the task from a .bat file on the remote server. I need help with getting the SSIS package script task to successfully execute either the remote task or the .bat file
Among other things, I have tried:
Dim ShellObject = CreateObject("WScript.Shell")
Dim strCmd As String
Dim intReturn As Integer
strCmd = "\\RemoteServerName\e$\Test\FileToRun.bat"
intReturn = ShellObject.run(strCmd, , True)
If intReturn = 0 Then
Dts.TaskResult = Dts.Results.Success
Dts.TaskResult = Dts.Results.Failure
Typically I find answers in previous postings from other people, but not this time, so I wonder if I'm even in the right ball park. Any help, and/or sample code would be very much appreciated!