diff --git a/print/autoconfig/ReadMe.md b/print/autoconfig/ReadMe.md index 28c454b17..21ee2294e 100644 --- a/print/autoconfig/ReadMe.md +++ b/print/autoconfig/ReadMe.md @@ -1,62 +1,40 @@ -Print Auto Configuration Sample +Print auto-configuration sample =============================== -The auto configuration sample demonstrates how to implement Unidrv-based and PScript5-based drivers to leverage the inbox support for auto-configuration. The sample works only when used with the standard TCP/IP port monitor or the Network-Connected Device (NCD) port monitor. +This sample demonstrates how to implement auto-configuration in v4 print drivers. -**Auto-Configuration Basics** +**Auto-configuration basics** -Prior to Microsoft® Windows® Vista, the settings of a print queue were set initially to the driver's default settings, rather than to the appropriate settings based on the device. For Unidrv or Pscript5, this means that static default values specified in the GPD or PPD file are used for the initial print queue setup. This static set of defaults must, necessarily, represent the minimum configuration that a printer can ship with. For instance, if a stapling unit is optional for a device, then by default, such a device cannot have stapling capability enabled, otherwise the user interface for devices without the stapling unit would show stapling as an option. A customer who selected the stapling option but found that it did not work would likely be confused. +Many printers ship with optional components which are not present in all versions of the printer. For these printers, it’s important that the driver only shows options which are enabled by the currently installed hardware. For example, if a stapling unit is optional for a particular printer, then the driver shouldn’t expose the stapling feature to the end user if that unit is not installed. -For any device that comes with features not present in the basic model, a user or administrator must manually configure these features on the print queue after installation. This can at times be a confusing and non-intuitive experience. The configuration process is easy to get wrong, particularly with regard to internal parameters such as memory and hard disk size, which significantly can affect printing speed and quality. +Windows auto-configuration allows a print driver to specify a mapping between driver installable options and the state of the printer as expressed through the Bidi Schema. -Auto-configuration solves this problem by automatically configuring the print queue according to the installable features on the device, rather than simply using the driver's static default settings. The main target for auto-configuration is network printers. They are the most likely ones to have multiple optional features and require more manual configuration. For more information, see [Printer Autoconfiguration](http://msdn.microsoft.com/en-us/library/windows/hardware/ff560774(v=vs.85).aspx). +For more information on auto-configuration, see [Printer Autoconfiguration](http://msdn.microsoft.com/en-us/library/windows/hardware/ff560774(v=vs.85).aspx). + +For more information on the Bidi Schema, see [Bidirectional Communication Schema](https://msdn.microsoft.com/en-us/library/windows/hardware/ff545169(v=vs.85).aspx). Build the sample ---------------- -The auto configuration sample doesn’t have any binaries to be built. It may be installed by using **Add Printer Wizard** and supplying the AutoCnfg.INF as the INF file. - -But to build a signed driver package using Windows 8.1 driver kit (Windows Driver Kit (WDK)) and Visual Studio 2013, for the project file (csproj) that ships with the auto configuration sample, perform the following steps. - -1. Open the solution file in Visual Studio 2013 - -2. Add all non-binary files (usually located in the \\install directory of the sample) to the Package project - -a. In the **Solution Explorer**, right click **Driver Files** - -b. Select **Add**, then click **Existing Item** - -c. Navigate to the location to which you downloaded the sample, and select all the files in the install directory, or the equivalent set of non-binary files such as INFs, INIs, GPD, PPD files, etc. - -d. Click **Add** - -3. Configure these files to be added into the driver package - -a. In the **Solution Explorer**, right click the Package project and select **Properties** - -b. In the left pane, click **Configuration Properties** \> **Driver Install** \> **Package Files**. - -c. In the right pane, use the ellipsis button (...) to browse to the set of files that needs to be added to the driver package. All the data files that you added in **Step 2-c**, except the INF file, should be added. - -**Note**  This configuration is per-architecture, so this configuration must be repeated for each architecture that will be built. +The auto-configuration sample doesn’t have any binaries to be built. It may be installed by using **Add Printer Wizard** and supplying the AutoCnfg.INF as the INF file. -d. Click **OK** +But to build a signed driver package using Windows Driver Kit (WDK) 10 and Visual Studio 2015, for the project file (csproj) that ships with the auto-configuration sample, perform the following steps. -4. Open the INF file and edit it to match the built output +1. Open the solution file in Visual Studio 2015. -a. Open the INF file +2. On the **Build** menu, select **Configuration Manager...**. -b. In the Version section, add a reference to a catalog file like this: CatalogFile=XpsDrvSmpl.cat +3. In **Configuration Manager**, select the **Configuration** and **Platform** that you want to build your driver for. -c. In the SourceDisksFiles section, change the location of the DLL files you are building, to =1. This indicates that there is no architecture specific directory in this driver. If you ship multiple architectures simultaneously, you will need to collate the driver INF manually. +**Note**  When the driver builds, it will be placed in the output folder for the architecture you selected. -At this point, Visual Studio 2013 will be able to build a driver package and output the files to disk. In order to configure driver signing and deployment, see [Developing, Testing, and Deploying Drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554651(v=vs.85).aspx). +At this point, Visual Studio will be able to build a driver package and output the files to disk. In order to configure driver signing and deployment, see [Developing, Testing, and Deploying Drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554651(v=vs.85).aspx). For more information about how to build a driver solution using Microsoft Visual Studio, see [Building a Driver](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554644). Run the sample -------------- -To test the auto-configuration feature you need to install the driver to a Standard TCP/IP port. You need a printer, which understands and responds to the bidi SNMP queries, connected to the port. The tcpbidi.xml file located in system32 directory has information about the SNMP OIDs used for each query. The installable options in the device settings will reflect the information obtained by querying the printer. +To run the auto-configuration sample, you must install this driver to support a printer which is installed against either a WSD port, or TCP/IP port. Additionally, USB printers may be supported if the driver is updated to incorporate USB Bidi Javascript, as described here: [Print Driver USB Monitor and Bidi Sample](https://github.com/Microsoft/Windows-driver-samples/tree/master/print/v4PrintDriverSamples/v4PrintDriver-USBMon-Bidi-Extension).