Fonts not found when print request comes from a child process of a Service

2

I have a strange issue on a Windows Server 2003 box which has been baffling me for days now.

I have a service running on the machine which calls a specified exe every 60 seconds, the exe looks at a local database to see if it needs to print anything, and if so, it prints it to a network laser printer.

The problem i'm having is that some fonts won't print out when the exe is called automatically by the service, but work fine if I double click the exe to run it.

The font was installed by Administrator, but the service runs as NT Authority\System. I thought this might have something to do with it, but I tried running the service as Administrator, and that didn't solve it.

Are there any issues with fonts and permissions that i'm not aware of that could be causing this behaviour?

beeglebug

Posted 2010-04-06T08:25:02.703

Reputation: 183

Answers

2

I've got it working now, although i'm still not entirely sure why.

As a last resort I restarted the box (I was loathe to do this originally as it's a server used by several remote sites), and now the service and it's child processes can print all fonts.

I don't know what happened during the reboot that doesn't happen during normal font installation, but whatever didn't have access now does!

beeglebug

Posted 2010-04-06T08:25:02.703

Reputation: 183

Thank you, your auto-answer solved also my customer's problem! It did not though about rebooting the server... Maybe the Windows services environment load all fonts only at boot time. – Pisu – 2012-06-12T14:40:51.063

probably the installer is run from another session thus your session program did not get notified to call AddFontResource – Sheng Jiang 蒋晟 – 2013-03-06T19:26:35.257

1

NT Authority\System has more local rights than normal administrators, so unless someone has added a deny ACL it will not be a permissions issue on local resources. (Network resources are a different matter, system has no access to network resources unless you allow guest access.)

I would suggest starting with Process Monitor to see what the application is failing to get access to. Also look for logging options (or anything else) that will get you diagnostic information.

NB. if the application is designed for interactive use it may be failing on trying to interact with the GUI in some way, solving this would almost certainly require code changes.

Richard

Posted 2010-04-06T08:25:02.703

Reputation: 8 152