0

I need to send some images to print to a printer, following is the code that have written in an SSIS package Active X script task, it works when I deploy it on SSIS and execute manually, it pops printing screen and sends the print and closes automatically, but when schedule a Job to the package, it does not send the print, where as the job completes successfully without giving any error.

Further noticed that the Kodakprv.exe process appears in the taskbar whenever I execute the Job, it seems like the job launches the exe via DTS but can't process the printing behavior.

Please suggest.

Function Main()

    Dim oWshShell
    set oWshShell = CreateObject("WScript.Shell")
    'msgbox """c:\progra~1\imagin~1\kodakprv.Exe""" + " /pt " + """D:\SQLDev\Dlls\Testing.TIF""" + " " + """\\Galactica\C-Test1"""
    oWshShell.Run("""c:\progra~1\imagin~1\kodakprv.Exe""" + " /pt " + """D:\SQLDev\Dlls\Testing.TIF""" + " " + """\\Galactica\C-Test1""")

End Function
shA.t
  • 16,580
  • 5
  • 54
  • 111
  • Script out the SQL Agent job and copy the arguments for the SSIS job step. Then, log on to the server that hosts SQL Agent and run the package as you. Command line approximate `dtexec.exe /file myPackage.dtsx` What you'll likely see is that it works there. If so, then you have a permission problem - likely the sql agent cannot access the `imagin~1` folder. A slightly less plausible reason is that the Agent user needs to be granted [InteractWithDesktop](http://stackoverflow.com/a/26122982/181965) – billinkc Mar 12 '15 at 16:43
  • thanks for your reply @billinkc, I re-checked all the permissions related to the issue that might be stopping the execution, but it looked good, am using admin user and have specifically given full permissions on the all folders in use by this code like image source, Kodak imaging and virtual printer folders. regarding Interfact with Desktop issue, I am executing the code on Windows server 2008 64 bit machine with SQL Server 2005 there. The same code works in SQL Server 2000 machine on another client, please suggest how can I check and fix this InteractWithDesktop issue. – Naveed Amwani Mar 13 '15 at 09:42

0 Answers0