OneNote File Printout not working

I experienced the issue of not able to use OneNote File Printout after applying Windows Updates. In my case I experienced the issue with Windows Server 2016 in a Citrix (PVS) environment. We talk about that button:
OneNote File Printout button
The error says: “Windows cannot print due to a problem with the current printer setup” and looked like that (if you try to print out a word file):
Printing error message winword

We know that after applying Windows Updates the functionality broke. The first thing we can do is to check which update leads to that error.
After some installing, and removing Windows patches it seems like KB5016622 is problematic. However, a search on the Internet for the problem led to no success.
After a while, I installed the latest Windows Updates and it seems that installing KB5017035 after applying KB5016622 fixes the issue.
Nice.
I tweeted about it:


And I thought that was it, thank you, and done.
I installed Windows Updates again after a while and the problem was back. Although now KB5017035 is installed.

I had the feeling that randomly uninstalling/installing Windows Updates doesn’t really solve the problem. I had to deal with it and we’ll start with the basics.

Always a good idea to check the event viewer. The application and system log had no entries of interest. The “Microsoft Office 16 Alerts” does contain our error message - but that doesn’t help much.

It seems it’s necessary to dig a little bit deeper into the problem. A good tool for that is Process Monitor (ProcMon). I captured a trace while I tried to use the File Printout button. Let’s check the process tree:
Process Monitor Process Tree
Nothing too crazy here. We would expect something like that. Directly from this menu, we use “Include Subtree” to get the parent OneNote.exe including all child processes. What I do most of the time is that I have the results counted and look at conspicuous and low-result events.
Process Monitor Results
I checked a few things like the NAME INVALID or OBJECT PATH INVALID results. ACCESS DENIED is in general a good idea to look into it but >500 events are a lot. I did check it briefly and scrolled through to see if there was anything exciting, but there was nothing for me. Something that is important, especially then with so many ACCESS DENIED events, which are completely missing the context.

The next step was to manually walk through the ProcMon file. We have about 130.000 lines - that’s the moment when you can grab the caffeine drink of your choice.
You can filter some noise like (don’t forget our output is still filtered to the process tree!):

  • exclude everything when the path contains \AppData\Local\Microsoft\OneNote\16.0\cache\
  • exclude everything when the path begins with HKCR
  • exclude everything when the path contains Citrix

and many more that would be possible. Of course, it would be better to know what exactly we are looking for, but I don’t know where the error comes from. Therefore, I could not be too strict. I reduced from 130k to 100k lines. Not that much, unfortunately. To be fair, usually, that’s an ongoing process. You analyze the ProcMon file, find something where you think “that’s okay, I can exclude that” and so of course ideally it reduces itself further and further.
My first goal was to find approximately where the error message occurs. Therefore we start reading the logfile from the bottom. If we had been particularly smart (I wasn’t), we could have remembered that the error message appears in the Event Viewer in the “Microsoft Office 16 Alerts” channel and filtered by that. Then we would have been close. After a few times of “page up” we come to the following place: Process Monitor NOT FOUND
That was the last action of splwow64.exe.
I checked it, and the directory C:\Windows\System32\DriverStore\FileRepository\ntprint.inf_amd64_6240f10271a3cadf didn’t exist. That might be the problem.

Because we have a working server I copied the directory ntprint.inf_amd64_6240f10271a3cadfto my non-working machine and install the driver again: pnputil -i -a ntprint.inf. The OneNote File Printout works again (at least for now).

  • Different Windows Updates lead to the error that OneNote File Printout stops working
  • ProcMon shows us the reason
  • Installing the missing driver restores the functionality

We could dig into the problem even more and try to figure out why different Windows Updates seem to remove this driver. But for now, we call it a day.

Happy Troubleshooting.