Jump to content
Welcome to our new Citrix community!
  • 0

Network TWAIN not working unless hooking is disabled


With VDA version 1909 and 1912 on Server 2016 Network-Twain is no longer working for us. Unless we disable Citrix TWAIN Hooking (Registry - "AppInit_Dlls\Twain Hook") for the applications used.
To make clear, this is not about TWAIN Client-Redirection! As long as twnhook.dll is loaded for the application process we cannot scan. Only "preview-scan" is working.
Issue does not occur in session 0 (console). Issue does occur using RDP- oder HDX-Sessions.
Anyone else seen this issue ?

Link to comment

6 answers to this question

Recommended Posts

  • 0

We ran into the same issue after upgrading from 7.15 CU5 to 1912 (server components and VDA), like you mentioned, only preview-scanning was working for us. In our case we are using RemoteScan.


Just found out from the vendor that they've been seeing the same thing and they let me know that the problem is the twnhook.dll file in C:\Program Files (X86)\Citrix\system32\ (which you seem to already know because you have the twnhook.dll tag). Their solution was to get a copy of that .dll file from when things were working and replace it. We have provisioning in place, so I booted a server to a version before we upgraded and pulled the twnhook.dll file from there.


It wasn't as easy as just replacing the file, as apparently the file was used by a gazillion processes (it can't be modified while it's in use). But I was able to get it replaced with the following process on a vDisk version in maintenance mode:


  1. Went to C:\Program Files (x86)\Citrix\System32
  2. Made a copy of the existing/broken twnhook.dll file and renamed it twnhook2.dll
  3. Opened the registry and went to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\citrix\CtxHook\AppInit_Dlls\Twain Hook
  4. Updated the FilePathName to have it now point to the copy I made, C:\Program Files (x86)\Citrix\System32\twnhook2.dll
  5. Rebooted the server.
  6. I was now able to replace the twnhook.dll file in C:\Program Files (x86)\Citrix\System32
  7. After replacing the file, I put back the original path in FilePathName (in the registry) to the twnhook.dll, C:\Program Files (x86)\Citrix\System32\twnhook.dll
  8. Restarted the server.
  9. Deleted the broken twnhook2.dll file.


We have always had a Studio policy with Client TWAIN device redirection set to Prohibited, so I didn't have to make any changes there.


We just made those changes today and things are back to normal.

Link to comment
  • 0

Thank you for your support @Cesar Reyes!

Just to give you an update on this.
We were sucessfull with twnhook.dll from:
- VDA1903 (dll-version 7.21.09)
- VDA1906.2 (dll-version
- VDA2003 (dll-version 7.25.09). 

With VDA1909 (dll-version 7.23.04) and VDA1912 (dll-version the issue comes up. So they broke it in 1909 i guess.
We already opened a citrix support ticket. Now we're waiting for a call back.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...