Scanner is working, but no longer in "Select Twain Source"

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, helmut, xnview

User avatar
windbag
Posts: 27
Joined: Mon Jan 16, 2012 10:33 am

Re: Scanner is working, but no longer in "Select Twain Sourc

Post by windbag »

XnTriq wrote:My (beer) gut feeling tells me that an incomplete un-installation prevented a successful re-installation of the driver.
Just looked at that, and it looks like I'm going to be put in detention again :wink:
It'll take a while... :wink: :wink:

What I can say is that the problem arose before ANY changes to XnView or the scanner, and some time in the last 6 weeks or so.
An incomplete un-installation of the Epson may now be present, but it couldn't have been when the problem kicked in.

cday wrote:My (non-beer) gut feeling is that the scanner problem could well be due to the extensive changes made to the XnView installation
I never made any changes to the XnView installation as such, which is why I didn't want to try changing its installation now, as I thought that could just complicate an already messy problem.

The 3 files I found that were probably moved were on my data area were these:

G:\Software-ProgramData\XnView
==============================

G:\Software-ProgramData\XnView\TOOLBARBUTTONSETUP
G:\Software-ProgramData\XnView\bookmark.ini
G:\Software-ProgramData\XnView\category.db


G:\Software-ProgramData\XnView\TOOLBARBUTTONSETUP
=================================================

G:\Software-ProgramData\XnView\TOOLBARBUTTONSETUP\foo.bar


Before I moved them they were in a folder one level down, so the last item was just :

G:\OtherDataFileGroups\Software-ProgramData\XnView\TOOLBARBUTTONSETUP\foo.bar

& ditto the rest.

I just noted that these files are NOT currently copied to my new NAS data area (F:), and was about to copy them there when I noticed the modified & access dates (actually I got the year wrong and thought they'd been accessed today, which rang alarm bells, as I've not run XnView today - but it was exactly a year ago).

the Un-moved foo.bar file (in OtherDataFileGroups\) was modified 20 ‎March ‎2014, ‏‎22:35:00, but "Accessed" exactly a year ago, 25 ‎March ‎2013, ‏‎06:43:54

what is XnView\TOOLBARBUTTONSETUP\foo.bar ?
and where would you expect it to be?

The moved version (G:\Software-ProgramData\XnView\TOOLBARBUTTONSETUP\foo.bar) shows modified 25 ‎March ‎2013, ‏‎06:44:10 ie just after the unmoved one was last accessed.
This one was last accessed ‎01 ‎August ‎2013, ‏‎08:44:38

Is this likely to have any bearing on the issue?
If not, my data file movements were not the origin of the problem.

(I did note an issue to do with %systemVariable%/Documents and Settings/%UserName%/Local settings/Temp folder: in the link above - I don't think I've been there, but I'll investigate and see.)
"I'll go for a walk. I could be some time." :|
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Scanner is working, but no longer in "Select Twain Sourc

Post by XnTriq »

cday wrote:If the scanner still doesn't work correctly, that would seem to be the time to start delving into a detailed examination of the above files...
As far as I'm concerned there's no need to inspect the files any further, cday.
I had downloaded the drivers to see what goes where during setup and just wanted to know if the files are where they belong or if they're scattered around on windbag's system.
cday wrote:In view of all the changes you've made to your computer, could I suggest a simple test: download the XnView Classic 2.20 zip version and extract it to a folder on your Windows partition, then launch it and check if your scanner is shown as a TWAIN device?
Here's how I usually go about in cases like this:
  1. Download XnView-win-small.zip (v2.20) and extract it to an FAT32-formatted USB flash drive.
    Note: This should rule out any problems with NTFS permissions.
  2. Create a text file named xnview.ini in the same directory as xnview.exe v2.20 with the following “code”:

    Code: Select all

    [Start]
    SavingMode=1
    ParamsSavingMode=1
    
    [Cache]
    SavingMode=1
    IsActive=0
    Note: This should prevent XnView v2.20 from messing with your v1.99.6 configuration.
  3. Run xnview.exe v2.20 to see whether or not the scanner can be accessed.
windbag wrote:what is XnView\TOOLBARBUTTONSETUP\foo.bar ?
and where would you expect it to be?
Customized toolbars (Tools » Options » Toolbar » Buttons » Buttons displayed) are saved as foo.bar. The location of this file depends on the settings in Tools » Options » System integration » Integration » Folder used for other files.
windbag wrote:Is this likely to have any bearing on the issue?
No.
windbag wrote:"I'll go for a walk. I could be some time." :|
Hang in there, windbag! We'll get to the bottom of this!
User avatar
windbag
Posts: 27
Joined: Mon Jan 16, 2012 10:33 am

Re: Scanner is working, but no longer in "Select Twain Sourc

Post by windbag »

XnTriq wrote:Here's how I usually go about in cases like this:
  1. Download XnView-win-small.zip (v2.20) and extract it to an FAT32-formatted USB flash drive.
    Note: This should rule out any problems with NTFS permissions.
  2. Create a text file named xnview.ini in the same directory as xnview.exe v2.20 with the following “code”:

    Code: Select all

    [Start]
    SavingMode=1
    ParamsSavingMode=1
    
    [Cache]
    SavingMode=1
    IsActive=0
    Note: This should prevent XnView v2.20 from messing with your v1.99.6 configuration.
  3. Run xnview.exe v2.20 to see whether or not the scanner can be accessed.
Sorry for the interlude - I'm also having to replace my monitor which is dying in the middle of all this, just to add that little frisson...

The good bit: That was refreshingly simple to achieve, thanks XnTriq.
The less good bit: No difference - nothing in the Twain list, No response when "Scan" icon pressed .
Pooh :(
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Scanner is working, but no longer in "Select Twain Sourc

Post by XnTriq »

windbag wrote:I'm also having to replace my monitor which is dying in the middle of all this, just to add that little frisson...
When it rains, it pours… \-:
windbag wrote:The good bit: That was refreshingly simple to achieve, thanks XnTriq.
That was cday's idea, to be fair (-:
windbag wrote:The less good bit: No difference - nothing in the Twain list, No response when "Scan" icon pressed .
As mentioned in one of my earlier posts, Epson's tech support recommends additional (manual) deinstallation steps to ensure that nothing is left behind by the previous installation of the driver.

Besides that, you could also try a hidden option (introduced in v1.97) which did the trick for me and my Samsung SCX-4100: newMethod=0/1
[color=green]xnview.ini[/color] wrote:

Code: Select all

[Start]
SavingMode=1
ParamsSavingMode=1

[Cache]
SavingMode=1
IsActive=0

[Scan]
newMethod=1
Note: Please remember to quit XnView before editing the INI file.
User avatar
windbag
Posts: 27
Joined: Mon Jan 16, 2012 10:33 am

Re: Scanner is working, but no longer in "Select Twain Sourc

Post by windbag »

Apologies to all for the protracted lack of response.
Last week a whole load of "end of UK tax year" tasks took over - then just as they were near completion on Friday, my PC RAID system started going down (which eventually turned out to be down to a dodgy SATA connection).
Despite having system restore points, and full image backups, by Monday morning I has no operating system AND a failed backup drive!
By various bits of luck and even more backups, I have now managed to get back to where I was on Friday, but all the jobs I should have been doing have now piled up instead - plus a whole load of new backup jobs to try & rectify the situation.
So, lack of scanner hasn't made it to the head of the queue - but I hope it will next week.

Did I mention I'm trying to organise a major house extension project too? No - well that adds to the merriment.... :wink:
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Scanner is working, but no longer in "Select Twain Sourc

Post by XnTriq »

windbag wrote:Last week a whole load of "end of UK tax year" tasks took over - then just as they were near completion on Friday, my PC RAID system started going down (which eventually turned out to be down to a dodgy SATA connection).

[…]

Did I mention I'm trying to organise a major house extension project too? No - well that adds to the merriment.... :wink:
Ouch! I'm glad you were able to restore your system.
Stay the course, windbag! We'll be waiting for you until everything's back on track. Good luck!
User avatar
windbag
Posts: 27
Joined: Mon Jan 16, 2012 10:33 am

Re: Scanner is working, but no longer in "Select Twain Sourc

Post by windbag »

Well, I'm finally back in the fray; trying to grasp this:
XnTriq wrote: Besides that, you could also try a hidden option (introduced in v1.97) which did the trick for me and my Samsung SCX-4100: newMethod=0/1
[color=green]xnview.ini[/color] wrote:

Code: Select all

[Start]
SavingMode=1
ParamsSavingMode=1

[Cache]
SavingMode=1
IsActive=0

[Scan]
newMethod=1
Note: Please remember to quit XnView before editing the INI file.
Well, I can find xnview.ini, but the link takes me to a place I don't understand - the page comes up between "scan" & "start", so I don't follow what to do with the text quoted above
(I assume I'm supposed to edit into the .ini file - but where?)

Also, there seems to be much posted while I've been doing Easter with the family - which I'll try & look at for relevance now....
User avatar
windbag
Posts: 27
Joined: Mon Jan 16, 2012 10:33 am

Re: Scanner is working, but no longer in "Select Twain Sourc

Post by windbag »

Ah, I may have got the idea;
I've found the start, cache & scan sections in the ini file (that the sections cited weren't in the alphabetic order used by the ini threw me for a while).
I've saved a copy of the original file under a different folder + "old" name for safety.

Do I just add the lines indicated within the sections?

I presume the other posts about going back to v 2.20 are a blind alley...?
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Scanner is working, but no longer in "Select Twain Sourc

Post by XnTriq »

windbag wrote:Do I just add the lines indicated within the sections?
  1. Download XnView-win-small.zip (v2.22) and extract it to a USB flash drive (preferably FAT32-formatted).
  2. Create a text file named xnview.ini in the same directory as xnview.exe v2.22 with the following “code”:

    Code: Select all

    [Cache]
    SavingMode=1
    IsActive=0
    
    [Scan]
    newMethod=1
    
    [Start]
    SavingMode=1
    ParamsSavingMode=1
  3. Run xnview.exe v2.22 to see whether or not the scanner can be accessed via TWAIN.
windbag wrote:I presume the other posts about going back to v 2.20 are a blind alley...?
I don't know yet. These posts have been split off into a separate topic.
User avatar
windbag
Posts: 27
Joined: Mon Jan 16, 2012 10:33 am

Re: Scanner is working, but no longer in "Select Twain Sourc

Post by windbag »

Many thanks for keeping with me, XnTriq, and for the clear directions for what to do.
XnTriq wrote:Run xnview.exe v2.22 to see whether or not the scanner can be accessed via TWAIN.[/list]
Did all that. No, scanner not appearing in TWAIN list.
cday
XnThusiast
Posts: 3973
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Scanner is working, but no longer in "Select Twain Sourc

Post by cday »

windbag wrote:No, scanner not appearing in TWAIN list.
Do you by any chance have XnViewMP 64-bit installed, or any other 64-bit program with TWAIN support?
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Scanner is working, but no longer in "Select Twain Sourc

Post by XnTriq »

cday wrote:Do you by any chance have XnViewMP 64-bit installed, or any other 64-bit program with TWAIN support?
He's on Vista 32bit, cday.
windbag wrote:No, scanner not appearing in TWAIN list.
Please run Registry Editor (regedit.exe), go to HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Twain and tell us what the value for Default Source is.
It should be C:\Windows\twain_32\escndv\per1670.ds.

Another possible solution comes from Jeff Widmer (Canon Scanner – Unable to open TWAIN source) who suggests to add the directory (C:\Windows\twain_32\escndv) of the data source file (per1670.ds) to the PATH environment variable.
User avatar
windbag
Posts: 27
Joined: Mon Jan 16, 2012 10:33 am

Re: Scanner is working, but no longer in "Select Twain Sourc

Post by windbag »

Again, thanks for the persistence & clear instructions; makes this much more heartening!
XnTriq wrote:Please run Registry Editor (regedit.exe), go to HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Twain and tell us what the value for Default Source is.
It should be C:\Windows\twain_32\escndv\per1670.ds.
It is, and I checked the file path is valid and that both per1670.ds and escndv.exe are there.
The latter certainly fires up the front end of the interface I'm missing, but still has the rubbish back end compared to XnView.
XnTriq wrote:Another possible solution comes from Jeff Widmer (Canon Scanner – Unable to open TWAIN source) who suggests to add the directory (C:\Windows\twain_32\escndv) of the data source file (per1670.ds) to the PATH environment variable.
I did, and it made no difference to either the standalone 2.22 on USB or my main PC version (still 1.99.6).
Unless I have to reboot for it to be effective-which I'll have to do soon; I'd been postponing Windows updates while trying to sort this out, but they were getting too many to ignore, so having just done that, I see it wants a "second round" now anyway, which will probably need (yet another) reboot.
cday
XnThusiast
Posts: 3973
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Scanner is working, but no longer in "Select Twain Sourc

Post by cday »

The XnView zip version test you performed was intended to determine whether the problem you describe arose from your installed XnView version or from an issue in your Windows TWAIN software, and seemed to indicate a Windows software issue.

May I suggest -- for want of other ideas -- another simple test to be absolutely sure by eliminating XnView completely from the equation: install Irfanview temporarily and check if your scanner is shown as a TWAIN source...

Edit:

Re-reading the whole thread I see that you reported earlier that you couldn't access the scanner from CorelDraw either, so the above suggested test looks unlikely to succeed although it would be very easy to perform.

But it still seems significant that you lost the ability to scan from XnView before reinstalling the scanner software the first time...
Last edited by cday on Sat May 03, 2014 7:38 pm, edited 1 time in total.
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Scanner is working, but no longer in "Select Twain Sourc

Post by XnTriq »

I'm afraid you have no choice but to un- & re-install the driver, adhering closely to Epson's instructions:
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?p=118663#p118663]27/Mar/2014[/url]) wrote:As mentioned in one of my earlier posts, Epson's tech support recommends additional (manual) deinstallation steps to ensure that nothing is left behind by the previous installation of the driver.
If you'd like to avoid reinstalling the driver at all cost, you could give the “TWAIN2 FreeImage Software Scanner” a try. It comes with this open source project (endorsed by the TWAIN Working Group & brought to my attention by cday):
  • TWAIN sample Data Source and Application
    “Use the TWAIN 2 sample data source and application, to test your TWAIN project, or as templates to incorporate TWAIN into your graphic applications or Scanner drivers.”
    • TWAIN Data Source
      “When finished this will be a TWAIN version 2.0 of the specification compliant data source. Instead of interfacing with a real scanner, it talks to a virtual scanner. The virtual scanner acquires its image from a file on disk.”
      • v2.0.9 (32-bit)
        • C:\Windows\System32\TWAINDSM.dll (v2.0.8)
        • C:\Windows\twain_32\sample2\FreeImage.dll
        • C:\Windows\twain_32\sample2\TWAINDS_Sample32.ds
        • C:\Windows\twain_32\sample2\TWAIN_logo.png
        • C:\Windows\twain_32\sample2\license.txt
    • TWAIN Application
      “This is a TWAIN version 2.1 of the specification compliant application. It offers text based interface. It shows how to implement many of the operations needed by an application.”
      • v2.1.2 (32-bit)
        • C:\Windows\System32\TWAINDSM.dll (v2.1.1)
        • C:\Program Files\TWAIN Working Group\TWAIN 2.1 App Sample\FreeImage.dll
        • C:\Program Files\TWAIN Working Group\TWAIN 2.1 App Sample\TWAIN_APP_CMD32.exe
        • C:\Program Files\TWAIN Working Group\TWAIN 2.1 App Sample\TWAIN_App_mfc32.exe
        • C:\Program Files\TWAIN Working Group\TWAIN 2.1 App Sample\license.txt
Post Reply