Link to home
Start Free TrialLog in
Avatar of barryr
barryr

asked on

Problem With Run-time Difference Between Task Scheduler Triggered Start and Manual Start

I'm using Task Scheduler to run scripts that integrate Author-it (authoring/publishing platform) and pdfFactory Pro (printer-queue PDF converter). When I start a task manually (click the Run button), it works perfectly. However, when I start the same task using a daily trigger, it appears to run correctly (no errors anywhere) but produces no PDF output files. There has to be a difference in the run-time environment that affects the PDF printer queue settings. (The job sets the default printer queue of course.)

The PDF printer queue keeps its queue-specific registry settings, including the desired PDF location, stored in HKEY_CURRENT_USER. The job uses the same username and password each time so theoretically, there should be no difference in the job's run-time environment. This one has had me baffled long enough to think about investing in a third-party task scheduler.
ASKER CERTIFIED SOLUTION
Avatar of Naga Bhanu Kiran Kota
Naga Bhanu Kiran Kota
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of barryr
barryr

ASKER

There was nothing in the security log but I found something in the Microsoft Office Sessions log. (Author-it uses Word to produce a temporary file and passes it to the PDF converter.) There are nine sequential messages of this type that correspond to the nine documents being published.

ID: 0, Application Name: Microsoft Office Word, Application Version: 12.0.4518.1014, Microsoft Office Version: 12.0.4518.1014. This session lasted 2 seconds with 0 seconds of active time.  This session ended normally.

Word cannot produce a temporary file in 2 seconds. Even a very small document (run interactively) requires 33 seconds. Thus, the Author-it to Word handoff is definitely the point of failure. Perhaps, Word is getting empty document data sets from Author-it. Or perhaps Word is running in a separate process that doesn't have "log on as batch job" rights.

I set the local security policy so that everyone can log on as a batch job and will test that. If it doesn't solve the problem, I'll have to find out more about how the Author-it to Word handoff actually works.
Avatar of barryr

ASKER

The "log on as batch job" rights didn't solve the problem. I don't expect anyone in here to know about the Author-it to Word integration so I'll close this and award the points for helping me get closer to a solution.
Hi

as far as author-IT is concerned i have worked a bit on it for developing content for my earlier organisations LMS. I had a test setup for my own learning. As it seems that the issue might be with Word exiting prematurely, Try to elevate the privileges for the MS word.exe program to run with Elevated privileges and also ensure that UAC is disabled for the purpose of verifying if UAC is causing any errors.

If this has exited in 2 seconds then the issue might be with the UAC, you can disable UAC by going to control panel and selecting the user and unchecking UAC and click ok, the changes would come into effect after the reboot.

bhanu
Avatar of barryr

ASKER

UAC is disabled systemwide.

I tried setting the task to "Run with highest privileges" but it doesn't help. I also set the owner of WINWORD.EXE to be the task owner but it doesn't help.

Is there a way to persistently elevate privileges for all WINWORD.EXE processes? (That sounds dangerous but the risk is acceptable on this particular server.)

Barry

you can right click the exe file>>properties>>compatibility>> check "run this programs as administrator"

you will find a tab "show settings for all users"  in that second screen check the "run this program as administrator"

that will give the elevated prvileges

you
Avatar of barryr

ASKER

That option is unavailable. According to Microsoft TechNet:

"If the Run this program as an administrator option is unavailable, it means that the application is blocked from always running elevated, the application does not require administrative credentials to run, the application is part of the current version of Windows Vista, or you are not logged into the computer as an administrator."

Word isn't part of Vista and I'm logged in as a member of the local Administrators group.

> ...the application is blocked from always running elevated

I'm wondering how to determine whether or not Word is on the list of blocked applications. Is that a security policy?