This problem seems caused by permission restrictions in Scheduled Task, we suggest you may use CmdAsUser.exe to run pdf2txtocr.exe from an normal user account instead of default system user account, CmdAsUser.exe can be downloaded from following web page,
CmdAsUser - start a command as a specified user. CmdAsUser command line is a freeware.
CmdAsUser.zip (32.40 KB).
Usage: CmdAsUser <user> <domain> [/p <password>] [/c <command>]
<user> is the name of the user.
<domain> is the logon domain, specify a period '.' for local.
<password> (optional) is the users password.
<command> (optional) is the command line to execute as the specified
If the password is not given then you will be prompted for it.
If the command is not given then "cmd" is assumed.
The calling process needs to either have administrative privileges (ie in the local adminstrators group) or at LEAST the following privileges:
"Act as part of the operating system" (SeTcbPrivilege),
"Bypass traverse checking" (SeChangeNotifyPrivilege),
"Increase quotas" (SeIncreaseQuotaPrivilege),
"Replace a process level token" (SeAssignPrimaryTokenPrivilege).
The utility may take a while if there is inappropriate security so please be patient.
CmdAsUser Martyn . /p GingerNinja /c regedit
CmdAsUser test . /p 123 /c "C:\Program Files\docPrintPro v4.5\doc2pdf.exe" -i htttp://www.verypdf.com -o "C:\out.pdf"
|You may encounter Error 1314 in some Windows systems, please by following steps to solve this 1314 Error,
To resolve this issue:
You may call following command line from Scheduled Task to try again,
CmdAsUser.exe Administrator . /p password /c C:\pdf2txtocr.exe C:\test.pdf C:\out.txt