Skip navigation

JSI Tip 0263 - How do I get a scheduled job to print?

You must run the Schedule service under the local system account. Use Control Panel / Services / Schedule to stop the Schedule service. Click the Startup button and verify that System Account and Allow System To Interact With Desktop is checked. Leave the schedule service stopped.

If you do not have a local printer, create one using the print driver for the device that the Scheduler will print to. Configure it for LPT1. Set this as the default printer.

Using the Windows 95 registry editor, regedit.exe edit:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\Current Version\Devices and Export Registry File as Drive:\SomeDirectory\Devices.
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\Current Version\PrinterPorts and Export Registry File as Drive:\SomeDirectory\Printer.
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\Current Version\Windows and Export Registry File as Drive:\SomeDirectory\Windows.

Edit each of the .reg files and replace HKEY_CURRENT_USER in the key with HKEY_USERS\.DEFAULT.
In Devices.reg, remove all the value entries except LocalPrinter....... Double click the file to run regedit.exe.
In Printer.reg, remove all the value entries except LocalPrinter....... Double click the file to run regedit.exe.
In Windows.reg, remove all the value entries except Device....... Double click the file to run regedit.exe.
You may now set your default printer back to the origonal value and start the Schedule service.

If your printer is really a local printer, use the /interactive switch with the AT command and your scheduled job will print.

If your printer is a remote network printer, use a batch job with the /interactive switch:

net use LPT1: /d
net use LPT1: \\PrintServer\PrintShare password /U:UserWithPermission
your print command
net use LPT1: /d
exit

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish