WIA Scanning issues on XP

2020-05-03 11:38发布

问题:

I have a WPF application that I am using to scan documents to a users mailbox etc.

When debugging the application on my 32bit Windows 7 professional machine all goes according to plan, as well as the deployed version on another 32bit Windows 7 machine.

When I deploy to a XP machine and try to start a scan I get the following error:

Retrieving the COM class factory for component with CLSID {850D1D11-70F3-4BE5-9A11-77AA6B2BB201} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

Any suggestions?

回答1:

The win 7 version does not work on xp - you could try downloading this version for XP.

download here



回答2:

To make deployment simpler, turn the files from Richard Friend's Answer into an Inno installer.

[Setup]
AppId={{4D9ADCF1-F6B4-4790-8B21-3C9F93346638}}
AppName="Microsoft Windows XP x86 WIA 2.0 Installer"
AppVersion="2.0"

OutputBaseFilename="Microsoft Windows XP x86 WIA 2.0 Installer"
Compression=lzma2/ultra64
CreateAppDir=no
Uninstallable=no

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Files]
Source: Files\wiaaut.chi; DestDir: {win}\HELP; Flags: onlyifdoesntexist
Source: Files\wiaaut.chm; DestDir: {win}\HELP; Flags: onlyifdoesntexist 
Source: Files\wiaaut.dll; DestDir: {sys}; Flags: onlyifdoesntexist regserver

I just did that since I have to deploy this in a small office and it works. I'm putting it on x86 machines only. You might have to tweak it a bit to work on x64 machines.



标签: c# wpf wia