; PmxScan.INF  -- Windows Still Image Setup File for the DDK
; ; WIN98 & 2000 System 2002/03/26 Scanner.OS 

; Leave thse lines as they are
[Version]
Signature="$CHICAGO$"
Class=Image
ClassGUID={6bdd1fc6-810f-11d0-bec7-08002be2092f}
Provider=%Msft%
LayoutFile=layout.inf, layout1.inf

[Manufacturer]
%Mfg%=Models

[Models]
; Replace PnPIDINformation with the hardware ID generated by your
; device for PnP identification
%ProductDesc% = Samp, USB\VID_0461&PID_0374
%ProductDesc% = Samp, USB\VID_0461&PID_0347
%ProductDesc% = Samp, USB\VID_0461&PID_0363
%ProductDesc% = Samp, USB\VID_0461&PID_0367
%ProductDesc% = Samp, USB\VID_0461&PID_0365
%ProductDesc% = Samp, USB\VID_04A7&PID_0224
%ProductDesc% = Samp, USB\VID_04A7&PID_0226
%ProductDesc% = Samp, USB\VID_04A7&PID_0225
%ProductDesc% = Samp, USB\VID_04A7&PID_0229
%ProductDesc% = Samp, USB\VID_0461&PID_0377
%ProductDesc% = Samp, USB\VID_0461&PID_0371
%ProductDesc% = Samp, USB\VID_04A7&PID_022C 
%ProductDesc% = Samp, USB\VID_0461&PID_0378 
%ProductDesc% = Samp, USB\VID_04A7&PID_0229 
%ProductDesc% = Samp, USB\VID_04A7&PID_022A
%ProductDesc% = Samp, USB\VID_0461&PID_0375 
%ProductDesc% = Samp, USB\VID_0402&PID_5623

[Uninstall.PreSetupCommand]
%10%\Twain_32\%TwainDir%\DelINF.EXE VID_0461&PID_0374
%10%\Twain_32\%TwainDir%\DelINF.EXE VID_0461&PID_0347
%10%\Twain_32\%TwainDir%\DelINF.EXE VID_0461&PID_0363
%10%\Twain_32\%TwainDir%\DelINF.EXE VID_04A7&PID_0224
%10%\Twain_32\%TwainDir%\DelINF.EXE VID_04A7&PID_0226
%10%\Twain_32\%TwainDir%\DelINF.EXE VID_04A7&PID_0225
%10%\Twain_32\%TwainDir%\DelINF.EXE VID_04A7&PID_0229
%10%\Twain_32\%TwainDir%\DelINF.EXE VID_0461&PID_0377
%10%\Twain_32\%TwainDir%\DelINF.EXE VID_0461&PID_0371
%10%\Twain_32\%TwainDir%\DelINF.EXE VID_04A7&PID_022C
%10%\Twain_32\%TwainDir%\DelINF.EXE VID_0461&PID_0378
%10%\Twain_32\%TwainDir%\DelINF.EXE VID_04A7&PID_0229
%10%\Twain_32\%TwainDir%\DelINF.EXE VID_04A7&PID_022A
%10%\Twain_32\%TwainDir%\DelINF.EXE VID_0461&PID_0375
%10%\Twain_32\%TwainDir%\DelINF.EXE VID_0402&PID_5623





[ControlFlags]
; remove comment from this line for PnP devices
; ExcludeFromSelect.WIN=*
ExcludeFromSelect=*

[SourceDisksNames]
1116=%ProductDesc%,,,

[SourceDisksFiles]


[DestinationDirs]
DefaultDestDir=11               ; LDID_SYS that is, \windows\system
CopyFiles.Sys32.NTX86=12				; system32\drivers
CopyFiles.Sys32.WIN=11
CopyFiles.Inf=17
CopyFiles.UninstallInf=10
TwainDriver.CopyFiles=10,twain_32\%TwainDir%
Uninstall.ExtraFiles=10,twain_32\%TwainDir%
TwainTrunk.CopyFiles=10
CopyFiles.USB=10,twain_32\%TwainDir%
CopyFiles.EPP=10,twain_32\%TwainDir%
CopyFiles.EPP.WIN=10,twain_32\%TwainDir%
CopyFiles.EPP.NTX86=12

[Samp]
; USB 95/98
;SubClass=StillImage
;DeviceType=1116
;DeviceSubType=0x1
;Capabilities=1116
;PropertyPages="USBScan.cpl,EnumStiPropPages"
;ICMProfiles="sRGB Color Space Profile.icm"
DeviceData=Samp.DeviceData
AddReg=Uninstall.Add.Reg.USB,Samp.AddReg.Win,Samp.AddReg.STI
;Events=SampUSD.Events
CopyFiles=Samp.CopyFiles,CopyFiles.Sys32.Win,TwainDriver.CopyFiles,CopyFiles.USB,TwainTrunk.CopyFiles,CopyFiles.Inf,CopyFiles.UninstallInf,AdvPack
Uninstall=DefaultUnInstall.USB
RunPostSetupCommands = PostSetupCommandsSection_Win
UpdateInis=Update.Hardware.INI

[Samp.NTX86]
; USB 2000
;SubClass=StillImage
;DeviceType=1116
;DeviceSubType=0x1
;Capabilities=1116
;PropertyPages="USBScan.cpl,EnumStiPropPages"
;ICMProfiles="sRGB Color Space Profile.icm"
DeviceData=Samp.DeviceData
AddReg=Uninstall.Add.Reg.USB.NTX86,Samp.AddReg.NTX86,Samp.AddReg.STI
;Events=SampUSD.Events
CopyFiles=Samp.CopyFiles,CopyFiles.Sys32.NTX86,TwainDriver.CopyFiles,CopyFiles.USB,TwainTrunk.CopyFiles,CopyFiles.Inf,CopyFiles.UninstallInf,AdvPack
Uninstall=DefaultUnInstall.USB.NTX86
RunPostSetupCommands = Uninstall.PreSetupCommand, PostSetupCommandsSection_NTX86
UpdateInis=Update.Hardware.INI


[Samp.Services]
AddService = pmxscan, 0x00000002, PmxScan.AddService

[Samp.NTX86.Services]
Include=sti.inf
Needs=STI.USBSection.Services


[PostSetupCommandsSection_Win]
RegEdit.exe /s %10%\twain_32\%TwainDir%\TWAIN.REG
Runutil.exe Showconnection:Eng


[PostSetupCommandsSection_NTX86]
RegEdit.exe /s %10%\twain_32\%TwainDir%\TWAIN.REG
%11%\Attrib.EXE -R %10%\twain_32\%TwainDir%\*.* /S
Runutil.exe Showconnection:Eng

[DefaultInstall]
; EPP 95/98
AddReg=Uninstall.Add.Reg.EPP
CopyFiles=Samp.CopyFiles,CopyFiles.EPP,CopyFiles.EPP.Win,TwainDriver.CopyFiles,TwainTrunk.CopyFiles,CopyFiles.Inf,CopyFiles.UninstallInf,AdvPack
Uninstall=DefaultUnInstall.EPP
RunPostSetupCommands = PostSetupCommandsSection_Win
UpdateInis=Update.Hardware.INI

[DefaultInstall.NTX86]
; EPP NT4/2000
AddReg=Uninstall.Add.Reg.EPP.NTX86,Samp.AddReg.NTX86.EPP
CopyFiles=Samp.CopyFiles,CopyFiles.EPP,CopyFiles.EPP.NTX86,TwainDriver.CopyFiles,TwainTrunk.CopyFiles,CopyFiles.Inf,CopyFiles.UninstallInf,AdvPack
Uninstall=DefaultUnInstall.EPP.NTX86
RunPostSetupCommands = PostSetupCommandsSection_NTX86
UpdateInis=Update.Hardware.INI

[Samp.DeviceData]
; Ancillary data to be associated with this device.
; TwainDS, ICMProfile, and ISISDriverName are known identifiers
TwainDS=%Product%
; ISISDriverName="Samp.pxw"
; You can also attach additional information to any device.
; SpecialInfo="My very special information"




[SampUSD.Events]
ButtonPress="%ButtonPress%",{EF2F45C1-E038-11D1-A415-0080C85429A2},Sti Event
ButtonDown0=%String8%,{F55B91C1-9471-11D2-953E-0040052FC4F9},*
ButtonDown1=%String9%,{F55B91C2-9471-11D2-953E-0040052FC4F9},*
ButtonDown2=%String10%,{F55B91C3-9471-11D2-953E-0040052FC4F9},*
ButtonDown3=%String11%,{F55B91C4-9471-11D2-953E-0040052FC4F9},*

[Samp.AddReg.Win]
; This all depends on which kernel services you need
HKR,,DeviceType,1,1
HKR,,DevLoader,,*NTKERN
; list system driver here if required such as this line for SCSI devices using MS SCSISCAN
HKR,,NTMPDriver,,"usbscan.sys"
HKR,,OkToHibernate,3,01

[Samp.AddReg.NTX86]
; This all depends on which kernel services you need
HKR,,DeviceType,1,1
HKR,,DevLoader,,*NTKERN
; list system driver here if required such as this line for SCSI devices using MS SCSISCAN
HKR,,NTMPDriver,,"usbscan.sys"
HKR,,OkToHibernate,3,01

[Samp.AddReg.NTX86.EPP]
; This all depends on which kernel services you need
"HKLM","System\CurrentControlSet\Services\ppsio2"
"HKLM","System\CurrentControlSet\Services\ppsio2",DisplayName,,"PPDevice"
"HKLM","System\CurrentControlSet\Services\ppsio2",Group,,"Extended base"
"HKLM","System\CurrentControlSet\Services\ppsio2",Type,0x00010001,1
"HKLM","System\CurrentControlSet\Services\ppsio2",Start,0x00010001,2
"HKLM","System\CurrentControlSet\Services\ppsio2",ErrorControl,0x00010001,1


[Samp.AddReg.STI]
; Replace the GUID in these four lines with a new GUID from guidgen
; Also change it in Sampusd.h
HKR,,USDClass,,"{C3A80960-28B1-11D1-ACAD-00A02438AD48}"
;Change the dll name at the end of this line
HKCR,CLSID\{C3A80960-28B1-11D1-ACAD-00A02438AD48},,,"USB Scanner STI USD"
HKCR,CLSID\{C3A80960-28B1-11D1-ACAD-00A02438AD48}\InProcServer32,,,%10%\twain_32\%TwainDir%\pmxusd.dll
HKCR,CLSID\{C3A80960-28B1-11D1-ACAD-00A02438AD48}\InProcServer32,ThreadingModel,,"Apartment"


[CopyFiles.Sys32.NTX86]
; Still Image Kernel Driver
usbscan.sys

[CopyFiles.Sys32.Win]
usbscan.sys



[PmxScan.AddService]
DisplayName    = %pmxscan.SvcDesc%
ServiceType    = 1                  ; SERVICE_KERNEL_DRIVER
StartType      = 3                  ; SERVICE_DEMAND_START
ErrorControl   = 1                  ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\usbscan.sys
LoadOrderGroup = Base

[DefaultUnInstall.USB.NTX86]
;USB Uninstall => Win2000
DelFiles=Samp.CopyFiles,TwainDriver.CopyFiles,CopyFiles.USB,Uninstall.ExtraFiles,CopyFiles.Inf
DelReg=Uninstall.Add.Reg.USB.NTX86
BeginPrompt=BeginUPromptSection
EndPrompt=EndUPromptSection
DelDirs = RemoveDirsSection
RunPostSetupCommands = PostSetupCommandSection_NTX86
RunPreSetupCommands = Uninstall.PreSetupCommand

[DefaultUnInstall.USB]
;USB Uninstall => 95/98
DelFiles=Samp.CopyFiles,TwainDriver.CopyFiles,CopyFiles.USB,Uninstall.ExtraFiles,CopyFiles.Inf
DelReg=Uninstall.Add.Reg.USB
BeginPrompt=BeginUPromptSection
EndPrompt=EndUPromptSection
DelDirs = RemoveDirsSection
RunPostSetupCommands = PostSetupCommandSection
RunPreSetupCommands = Uninstall.PreSetupCommand

[DefaultUnInstall.EPP.NTX86]
;EPP Uninstall => Win2000
DelFiles=Samp.CopyFiles,TwainDriver.CopyFiles,CopyFiles.EPP,CopyFiles.EPP.NTX86,Uninstall.ExtraFiles,CopyFiles.Inf
DelReg=Uninstall.Add.Reg.EPP.NTX86,Samp.AddReg.NTX86.EPP
BeginPrompt=BeginUPromptSection
EndPrompt=EndUPromptSection
DelDirs = RemoveDirsSection
RunPostSetupCommands = PostSetupCommandSection_NTX86

[DefaultUnInstall.EPP]
;EPP Uninstall => 95/98
DelFiles=Samp.CopyFiles,TwainDriver.CopyFiles,CopyFiles.EPP,CopyFiles.EPP.Win,Uninstall.ExtraFiles,CopyFiles.Inf
DelReg=Uninstall.Add.Reg.EPP
BeginPrompt=BeginUPromptSection
EndPrompt=EndUPromptSection
DelDirs = RemoveDirsSection
RunPostSetupCommands = PostSetupCommandSection


[PostSetupCommandSection]
RunDll32 Advpack.dll,LaunchINFSection %17%\HotKey.INF,DefaultUnInstall
RunDll32 Advpack.dll,LaunchINFSection %17%\Sbutoon.INF,DefaultUnInstall

[PostSetupCommandSection_NTX86]
;;;RunDll32 Advpack.dll,LaunchINFSection %17%\HotKey.INF,DefaultUnInstall.NTX86
RunDll32 Advpack.dll,LaunchINFSection %17%\Sbutoon.INF,DefaultUnInstall.NTX86

[Uninstall.ExtraFiles]
Twain.GID
Preview.bmp
PRDirect.log

[BeginUPromptSection]
Prompt=%BeginUPromptPrompt%
ButtonType=YESNO
Title=%BeginUPromptTitle%

[EndUPromptSection]
Prompt=%EndUPromptPrompt%

[RemoveDirsSection]
%10%\Twain_32\%TwainDir%


[Uninstall.Add.Reg.USB]
;;;HKCU,Software\Visioneer\TwainPrefs
;;;HKLM,%Uninstall%%Product%
;;;HKLM,%Uninstall%%Product%,"DisplayName",,"%Product%"
;;;HKLM,%Uninstall%%Product%,"UninstallString",,"RunDll32 advpack.dll,LaunchINFSection %10%\PmxScan.INF,DefaultUnInstall.USB"

[Uninstall.Add.Reg.USB.NTX86]
;;;HKCU,Software\Visioneer\TwainPrefs
;;;HKLM,%Uninstall%%Product%
;;;HKLM,%Uninstall%%Product%,"DisplayName",,"%Product%"
;;;HKLM,%Uninstall%%Product%,"UninstallString",,"RunDll32 advpack.dll,LaunchINFSection %10%\PmxScan.INF,DefaultUnInstall.USB.NTX86"

[Uninstall.Add.Reg.EPP]
;;;HKCU,Software\Visioneer\TwainPrefs
;;;HKLM,%Uninstall%%Product%
;;;HKLM,%Uninstall%%Product%,"DisplayName",,"%Product%"
;;;HKLM,%Uninstall%%Product%,"UninstallString",,"RunDll32 advpack.dll,LaunchINFSection %10%\PmxScan.INF,DefaultUnInstall.EPP"

[Uninstall.Add.Reg.EPP.NTX86]
;;;HKCU,Software\Visioneer\TwainPrefs
;;;HKLM,%Uninstall%%Product%
;;;HKLM,%Uninstall%%Product%,"DisplayName",,"%Product%"
;;;HKLM,%Uninstall%%Product%,"UninstallString",,"RunDll32 advpack.dll,LaunchINFSection %10%\PmxScan.INF,DefaultUnInstall.EPP.NTX86"

[Update.Hardware.INI]
;%10%\Twain_32\%TwainDir%\Hardware.INI, "Identity",,"ProductName=%Product%"    	 ,0
;%10%\Twain_32\%TwainDir%\Hardware.INI, "Identity",,"ProductName_16=%Product%"  	 ,0
;%10%\Twain_32\%TwainDir%\Hardware.INI, "Option"  ,,"Caption=%TwainUIName%"       ,0

[Strings]
Uninstall="Software\Microsoft\Windows\CurrentVersion\Uninstall\"
ButtonPress="Launch Button Push"
pmxscan.SvcDesc= "USB Uniscan e46 Driver"
String8="Scan Button"
String9="Copy/Print Button"
String10="Fax Button"
String11="Custom Button"
Msft=USB Scanner
Mfg=USB Scanner
ProductDesc="Uniscan e46"

Product="Uniscan e46"
;TwainUIName="Uniscan e46" 
TwainDir="Th7100"
BeginUPromptPrompt="Are you sure you want to remove Uniscan e46?"
BeginUPromptTitle="Uniscan e46 Uninstall"
EndUPromptPrompt="Uniscan e46 was successfully removed from your computer."

