We invoke doc2any from a VBScript on the server. When we manually run the script on the server (using a remote desktop session) then everything works as expected.
However, when we use task scheduler to trigger the script on a periodic basis then we run into trouble.
If the scheduled task is run as user SYSTEM, then doc2any is unable to invoke Microsoft Word and instead falls back on a very default PDF conversion. The resultant PDF is not acceptable as it is a ‘plain text’ conversion and many elements from the Word document are missing.
If the scheduled task is run as any other user, then that user must have a remote desktop session open to produce a correct PDF. If the user logs out, then doc2any falls back on the plain text conversion.
I have also tried starting doc2any_service\docPrint_Service.exe. This method works until the user who started docPrint_Service logs out. Then doc2any is again unable to find Word and falls back on plain text conversion.
The question is: Is there any way that doc2any can be used on the server without having a remote desktop session open? I.e. in a ‘non interactive’ session, run as user SYSTEM.
Many thanks
Customer
-------------------------------------------------
Microsoft expand on the issues here:
http://support.microsoft.com/kb/257757
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
Customer
-------------------------------------------------
>>Can doc2any be used in a non-interactive session?
Yes, doc2any can be used in an non-interactive session, but you need set MS Word DCOM run inside an interactive user account, please refer to following web pages for more information,
http://www.verypdf.com/wordpress/201109/doc2any-sdk-dll-does-work-on-localhost-but-not-work-on-internet-2333.html
https://www.verydoc.com/blog/how-to-call-doc2any-exe-from-asp-code.html
https://www.verydoc.com/blog/running-doc2any-as-a-scheduled-task.html
https://www.verydoc.com/others/configure-word-and-excel.htm
https://www.verydoc.com/blog/failed-to-call-doc2any-exe-from-c-or-vb-net-source-code.html
https://www.verydoc.com/blog/cannot-test-doc2any-on-net.html
https://www.verydoc.com/blog/failed-to-call-doc2any-exe-from-java-application-to-convert-pptx-and-docx-files-to-pdf-files.html
https://www.verydoc.com/blog/run-doc2any-on-windows-2003-or-windows-2008-system.html