NPrinting:QV fails to open document: Illegal operation attempted on a registry key that has been marked for deletion
Article Number: 000014075 | Last Modified: 2018/07/24
Description:This error message appears in the NPrinting log files when QlikView cannot access the application file. So, the NPrinting report is not generated.
A couple of articles explain that this issue is a known Microsoft issue:
A COM+ application may stop working on Windows Server 2008/2012 when the identity user logs off
The issue happens when the identity user logs off and the COM+ application can no longer read registry keys in the profile of the identity user because of a new User Profile Service functionality of forcing the unload of the user profile on Windows Server when the user logs off. Note this new User Profile Service functionality is built into the OS by default.This is a situation where the functionality of forcing the unload of the user profile may break an application if registry handles are not closed in the process.
As a workaround it may be necessary to disable this feature which is the default behavior. The policy setting 'Do not forcefully unload the user registry at user logoff' counters the default behavior of Windows 2008/2012. When enabled, Windows 2008/2012 does not forcefully unload the registry and waits until no other processes are using the user registry before it unloads it.
The policy can be changed using gpedit.msc.
The path of the policy is:
Computer Configuration->Administrative Templates->System-> UserProfiles
The policy is: “Do not forcefully unload the user registry at user Logoff”
Set this to "enabled".