Hi Kumar,
Please see http://msdn.microsoft.com/en-us/library/ms791134.aspx for the
list of available classes. For the printer class you'll notice both the Class
name and GUID. You need to be sure to change the class guid section in the
[Version] section of the INF as well.
http://msdn.microsoft.com/en-us/library/ms794526.aspx gives more info on the
[Version] section.
Note that the sample shows how to create a custom class if needed. In your
case it's not needed, so you can change the Class and ClassGuid values in the
version section and then Delete the entire [ClassInstall32] section as that
won't be needed for an exsisting class. Be sure when updating your inf for
testing like this, that you keep incrementing the version numbers etc. This
makes it easier to ensure your new driver package is being selected. If
you're still have problems getting the new package selected, you need to
remove the old driver package from the store using the tool pnputil. See
pnputil -? for help on it.
/***********inf file modified for Printer***************/
;
; Copyright (c) Microsoft Corporation. All rights reserved.
;
; Description:
; INF for WSD and SSDP ISimpleThermostat devices
;
[Version]
Signature="$WINDOWS NT$"
Class=Printer; Choose a class for your device.
Predefined or new.
Provider=%MSFT% ; Provider of this
device. i.e. Manufacturer
ClassGuid={4d36e979-e325-11ce-bfc1-08002be10318}
DriverVer=12/08/2006,1.00.0000
;CatalogFile=SimpleThermostat.cat
;CatalogFile=aaaa4ep2.cat
;[DestinationDirs]
;DefaultDestDir = 11 ; Install files to
...\system32 by default (DIRID_SYSTEM)
;
; Call SetupSetDirectoryId with 66000 to set the target directory at runtime
; (depending on which environment drivers are getting installed)
;
[DestinationDirs]
DefaultDestDir=66000
XXXXXS4e_SYS32=11
; ================= PnP-X Test Device section ====================
; Should list all device manufacturer/model combinations here
[Manufacturer]
%MSFT%=PnpxTestDevice, ntamd64, ntia64
; Model specific install section list (x86 Section)
[PnpxTestDevice]
; Model Device Description Install Section HWIDs, Compatible IDs
; ------------------------ --------------------
----------------------------
%PnpxTestDevice.DeviceDesc1%=PnpxTestDevice_Install,
UMB\PnPX_SimpleThermostat1_HWID
; Model specific install section list (x64 section)
;[PnpxTestDevice.ntamd64]
;%PnpxTestDevice.DeviceDesc1%=PnpxTestDevice_Install,
UMB\PnPX_SimpleThermostat1_HWID
; Model specific install section list (IA64 Section)
;[PnpxTestDevice.ntia64]
;%PnpxTestDevice.DeviceDesc1%=PnpxTestDevice_Install,
UMB\PnPX_SimpleThermostat1_HWID
; ===================== Install Sections =======================
[PnpxTestDevice_Install]
CopyFiles =
XXXXX_COMMON_COPY,XXXXX_eS4e_COPY,XXXXXeS4e_SNMP,XXXXXeS4e_SYS32
;RegisterDlls = ThermRegSvr
DriverFile = aaaa4ep3.dll
ConfigFile = aaaa4ep3ui.dll
DataFile = aaaa4e_1.PPD
HelpFile = aaaaCPS.chm
; Copy the proxy dll to system32
;[ThermCopyFiles]
;SimpleThermostatProxy.dll
[XXXXX_COMMON_COPY]
aaaa4ep3.dll,,,0x00000020
aaaa4ep3wm.exe,,,0x00000020
aaaa4ep.pdf,,,0x00000020
aaaa4ep2.XPI,,,0x00000020
aaaa4eDTP.dll,,,0x00000020
aaaa4ePrc.dll,,,0x00000020
aaaa4eIP.dll,,,0x00000020
aaaaDLD.chm,,,0x00000020
[XXXXXeS4e_SNMP]
aaaaCFG.dll,,,0x00000020
aaaaPCF.dll,,,0x00000020
aaaaDLDLG.dll,,,0x00000020
aaaaDLD.dll,,,0x00000020
aaaasnm.dll,,,0x00000020
[XXXXXeS4e_SYS32]
aaaasnm.dll,,,0x00000020
[XXXXX_eS4e_COPY]
aaaa4ep3ui.dll,,,0x00000020
aaaa4eppr.gps,,,0x00000020
aaaa4eVal.xml,,,0x00000020
aaaaChsp.xml,,,0x00000020
aaaapeu.bin,,,0x00000020
aaaapjp.bin,,,0x00000020
aaaapuc.bin,,,0x00000020
aaaaCh01.bin,,,0x00000020
aaaaCh02.bin,,,0x00000020
aaaaCh03.bin,,,0x00000020
aaaaCh04.bin,,,0x00000020
aaaaCh05.bin,,,0x00000020
aaaaCh06.bin,,,0x00000020
aaaaCh07.bin,,,0x00000020
aaaaCh08.bin,,,0x00000020
aaaaCh09.bin,,,0x00000020
aaaaCh10.bin,,,0x00000020
aaaa2CPS.chm,,,0x00000020
aaaaChsp.chm,,,0x00000020
aaaa4e_1.PPD,,,0x00000020
aaaap3he.dll,,,0x00000020
aaaap3hr.dll,,,0x00000020
aaaaPVen.lbf,,,0x00000020
aaaaFN.xml,,,0x00000020
; Register the proxy dll (calls DLLRegisterServer)
[ThermRegSvr]
11,,aaaap3.dll,1,
;
; Source Disk Section
;
[SourceDisksNames.x86]
1 = %aaaaDISK%,,,"."
[SourceDisksFiles.x86]
aaaap3ui.dll = 1,,
aaaap.pdf= 1,,
aaaap2.XPI= 1,,
aaaap3wm.exe= 1,,
aaaap3.dll= 1,,
; Optional section to add device specific information to the registry
[PnpxTestDevice_Install.HW]
AddReg=PnpxTestDevice_Install.HW.AddReg
;Add the interface the device supports (ISimpleThermostat)
[PnpxTestDevice_Install.HW.AddReg]
HKR,,InterfaceGUIDs,0x10000, "{e6ef452a9-9ad3-4ce5-9718-8c32953d66fd}"
; Setup the UMPass service for the device
[PnpxTestDevice_Install.Services]
AddService = UMPass, %SPSVCINST_ASSOCSERVICE%, UMPassService_Install
[UMPassService_Install]
DisplayName = %umpass.SVCDESC% ; Friendly Name of the Service
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\umpass.sys
LoadOrderGroup = Extended Base
; Strings that are referenced throughout the INF
[Strings]
MSFT = "Microsoft"
ClassName = "Printer"
SPSVCINST_ASSOCSERVICE= 0x00000002
umpass.SVCDESC = "Microsoft UMPass Driver"
PnpxTestDevice.DeviceDesc1 = "Device 1"
/***********inf file modified for Printer***************/
Post by KumarHi Vidager,
Thanks for the Reply. These replies are solving so many doubts i had. Again
thanks for the repiles.
I have modified the SimpleThermostat's inf (for verification) for the
installation of the printer through TCP/IP port installation instead of WSD
port(WS-Print Spec) after going through PnPx versus DPWS thread. But with
this inf file i'm not seeing the device getting installed as a printer but
it is seen as a PnP-X sample in Device Explorer.
/***********inf file modified for Printer***************/
;
; Copyright (c) Microsoft Corporation. All rights reserved.
;
; INF for WSD and SSDP ISimpleThermostat devices
;
[Version]
Signature="$WINDOWS NT$"
Class=Printer ; Choose a class for your device.
Predefined or new.
Provider=%MSFT% ; Provider of this
device. i.e. Manufacturer
ClassGuid={e6ef26a0-9ad3-4ce5-9718-8c32953d66fd} ; If class above is new,
specify your unique guid for it
DriverVer=12/08/2006,1.00.0000
;CatalogFile=SimpleThermostat.cat
;CatalogFile=aaaa4ep2.cat
;[DestinationDirs]
;DefaultDestDir = 11 ; Install files to
...\system32 by default (DIRID_SYSTEM)
;
; Call SetupSetDirectoryId with 66000 to set the target directory at runtime
; (depending on which environment drivers are getting installed)
;
[DestinationDirs]
DefaultDestDir=66000
XXXXXS4e_SYS32=11
; ================= PnP-X Sample Devices Class Section =====================
; This section is required if you're defining a new Class
[ClassInstall32]
Addreg=PnpxSampleDevices_ClassReg
[PnpxSampleDevices_ClassReg]
HKR,,,,%ClassName% ; Friendly Name for this device class
HKR,,SilentInstall,,1 ; Specify a silent installation for this
device class
HKR,,Icon,,"-52" ; Icon to use for this device class
; ================= PnP-X Test Device section ====================
; Should list all device manufacturer/model combinations here
[Manufacturer]
%MSFT%=PnpxTestDevice, ntamd64, ntia64
; Model specific install section list (x86 Section)
[PnpxTestDevice]
; Model Device Description Install Section HWIDs, Compatible IDs
; ------------------------ --------------------
----------------------------
%PnpxTestDevice.DeviceDesc1%=PnpxTestDevice_Install,
UMB\PnPX_SimpleThermostat1_HWID
; Model specific install section list (x64 section)
;[PnpxTestDevice.ntamd64]
;%PnpxTestDevice.DeviceDesc1%=PnpxTestDevice_Install,
UMB\PnPX_SimpleThermostat1_HWID
; Model specific install section list (IA64 Section)
;[PnpxTestDevice.ntia64]
;%PnpxTestDevice.DeviceDesc1%=PnpxTestDevice_Install,
UMB\PnPX_SimpleThermostat1_HWID
; ===================== Install Sections =======================
[PnpxTestDevice_Install]
CopyFiles =
XXXXX_COMMON_COPY,XXXXX_eS4e_COPY,XXXXXeS4e_SNMP,XXXXXeS4e_SYS32
;RegisterDlls = ThermRegSvr
DriverFile = aaaa4ep3.dll
ConfigFile = aaaa4ep3ui.dll
DataFile = aaaa4e_1.PPD
HelpFile = aaaaCPS.chm
; Copy the proxy dll to system32
;[ThermCopyFiles]
;SimpleThermostatProxy.dll
[XXXXX_COMMON_COPY]
aaaa4ep3.dll,,,0x00000020
aaaa4ep3wm.exe,,,0x00000020
aaaa4ep.pdf,,,0x00000020
aaaa4ep2.XPI,,,0x00000020
aaaa4eDTP.dll,,,0x00000020
aaaa4ePrc.dll,,,0x00000020
aaaa4eIP.dll,,,0x00000020
aaaaDLD.chm,,,0x00000020
[XXXXXeS4e_SNMP]
aaaaCFG.dll,,,0x00000020
aaaaPCF.dll,,,0x00000020
aaaaDLDLG.dll,,,0x00000020
aaaaDLD.dll,,,0x00000020
aaaasnm.dll,,,0x00000020
[XXXXXeS4e_SYS32]
aaaasnm.dll,,,0x00000020
[XXXXX_eS4e_COPY]
aaaa4ep3ui.dll,,,0x00000020
aaaa4eppr.gps,,,0x00000020
aaaa4eVal.xml,,,0x00000020
aaaaChsp.xml,,,0x00000020
aaaapeu.bin,,,0x00000020
aaaapjp.bin,,,0x00000020
aaaapuc.bin,,,0x00000020
aaaaCh01.bin,,,0x00000020
aaaaCh02.bin,,,0x00000020
aaaaCh03.bin,,,0x00000020
aaaaCh04.bin,,,0x00000020
aaaaCh05.bin,,,0x00000020
aaaaCh06.bin,,,0x00000020
aaaaCh07.bin,,,0x00000020
aaaaCh08.bin,,,0x00000020
aaaaCh09.bin,,,0x00000020
aaaaCh10.bin,,,0x00000020
aaaa2CPS.chm,,,0x00000020
aaaaChsp.chm,,,0x00000020
aaaa4e_1.PPD,,,0x00000020
aaaap3he.dll,,,0x00000020
aaaap3hr.dll,,,0x00000020
aaaaPVen.lbf,,,0x00000020
aaaaFN.xml,,,0x00000020
; Register the proxy dll (calls DLLRegisterServer)
[ThermRegSvr]
11,,aaaap3.dll,1,
;
; Source Disk Section
;
[SourceDisksNames.x86]
1 = %aaaaDISK%,,,"."
[SourceDisksFiles.x86]
aaaap3ui.dll = 1,,
aaaap.pdf= 1,,
aaaap2.XPI= 1,,
aaaap3wm.exe= 1,,
aaaap3.dll= 1,,
; Optional section to add device specific information to the registry
[PnpxTestDevice_Install.HW]
AddReg=PnpxTestDevice_Install.HW.AddReg
;Add the interface the device supports (ISimpleThermostat)
[PnpxTestDevice_Install.HW.AddReg]
HKR,,InterfaceGUIDs,0x10000, "{e6ef452a9-9ad3-4ce5-9718-8c32953d66fd}"
; Setup the UMPass service for the device
[PnpxTestDevice_Install.Services]
AddService = UMPass, %SPSVCINST_ASSOCSERVICE%, UMPassService_Install
[UMPassService_Install]
DisplayName = %umpass.SVCDESC% ; Friendly Name of the Service
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\umpass.sys
LoadOrderGroup = Extended Base
; Strings that are referenced throughout the INF
[Strings]
MSFT = "Microsoft"
ClassName = "Printer"
SPSVCINST_ASSOCSERVICE= 0x00000002
umpass.SVCDESC = "Microsoft UMPass Driver"
PnpxTestDevice.DeviceDesc1 = "Device 1"
/***********inf file modified for Printer***************/
Can you please let me know what is the issue with the inf file. Device
installation is successful with this inf but the printer is not listed in
printers folder.
Thanks and Regards,
Kumar
Post by VidagerHi Kumar,
To answer your first question: Yes you need to add hardware id(s) and
optionally compatible id(s) to your metadata to be PnP-X compliant. Device
Category is also desirable, but is optional.
wsd:ThisModel/pnpx:DeviceCategory
wsd:Hosted/pnpx:hardwareID
wsd:Hosted/pnpx:compatibleID
Please see the PnP-X document for full details. At a minimum please read
the section titled "Creating a PnP-X Device" starting on page 6.
http://www.microsoft.com/whdc/connect/Rally/pnpx-spec.mspx
For your second question, I think it will be answered by reading the thread
discussion below we have been having with Shanky. You will find the thread
below with the subject titled "pnpx versus DPWS".
Thanks!
Ben [MSFT]
Post by KumarHi Vidager,
Thanks for the Reply.
I could solve the issue, with the solution given. Again thanks for the
response.
I have some questions regarding PnP-X and DPWS.
1. I want my device to be PnP-X Compatible which has already has DPWS
Stack.(I think DPWS by itself is not PnP-X compatible) What are the other
things which are to be included to make it PnP-X compatible?
2. I want to use different printing protocol(May be IPP, 9100...) instead of
WS-Print Specification for the Device discovered using PnP-X? Is this
possible?
If it is possible, What are the changes which are to be taken care by device
while implementing WS-Discovery Specification.
Thanks and Regards,
Sunil