Running an application using a DTS Package | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Running an application using a DTS Package

Hello I need to run an external application at a certain time, every day.
I saw that we can use vbscript in a DTS package in order to open any application.
When I execute the DTS package, the result is what I need. I can see my application on the screen and is working good. However, if I schedule the package, when the time comes and the package is executed, the result is not what I expect. My application is not visible and I can see it in the task list as a Process and not as an Application. This is the code I’m using (I got it from internet): Function Main()
Dim objshell
set objshell = CreateObject("")
objshell.Run "C:myappmyapp.exe"
Main = DTSTaskExecResult_Success
End Function

can u use something like this
Shell "notepad.exe c:
ate.txt", vbMaximizedFocus

I think Shell is a VB command and is not recognized as valid VBScript syntax.
Can we use VB inside a DTS package?
Is there any way to use T-SQL in order to run an external application? I made some tests with xp_cmdshell to run a batch file, but i was not succeed.
Ensure the SQLAgent has required privileges to run that application. Satya SKJ
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.