troubleshooting Question

Print PDF as custom service SBS2008

Avatar of deibel
deibelFlag for Germany asked on
Windows Server 2008Programming
12 Comments1 Solution731 ViewsLast Modified:
Hi Experts,

I need your advice!

I want to print a PDF from a SBS2008 periodical once a day.
The PDF is created by another application and saved in a local folder.
This little "printservice" has to run in background with no user activity an also with no user logged into the machine.

I wrote a batchfile and configured the taskplaner to execute it.
but that doesnt work with no user logged into the machine.

so i thought i need a custom service and created one with srvany.exe
i modified the batch to an infinite loop
but that didnt work either.

This is my batchfile:
:START
start runas /profile /savecred /user:sysadmin@domain.local "C:\Program Files (x86)\Adobe\Reader 9.0\Reader\AcroRd32.exe /p /h c:\test\Test.pdf"
@time /T>> c:\test\test.txt
timeout /T 300
Taskkill /F /IM acrord32.exe /T

goto START

I saw, that no printer is given as argument to AcroRd32 /p so i thought it only prints to the default printer. But there is no default printer, when no user is logged in. So I tried runas with no effect.

I googled a bit an read somthing about missing rights. But I dont really understand that.

Can anybody give me an advice?

Thanks in advance
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros