From 97cf5197cf5b882b2c689d8dc2b555f2edf8f418 Mon Sep 17 00:00:00 2001
From: Dave Wilson
Description + +
Usage of the +DIFXAPI Sample Program
This sample demonstrates how to use DIFx API. It shows how to preinstall, +install and uninstall driver packages. It also shows how to retrieve the path to +an already preinstalled or installed driver package. It furthers shows how to +capture logging information that the APIs create during installs and uninstalls.
+Navigate to the src\setup\DIFxAPI\DIFXCMD directory and run the following +command: +
build -cZ +
Once the sample is built, run the following commands. Before running the +command, copy a complete driver package into the same directory:
+difxcmd.exe to print out how to use the command line tool + +
+difxcmd.exe /p my.inf , to preinstall my.inf
+difxcmd.exe /i my.inf , to install my.inf
+difxcmd.exe /i my.inf 16, to install my.inf in legacy mode (accepting unsigned drivers) +
+difxcmd.exe /p my.inf , to obtain the path to the installed my.inf
+difxcmd.exe /u my.inf , to uninstall my.inf
+difxapi /p /i /u /g <inf-filename> [Flag(s)]
+
+Options:
+/p : preinstall driver package.
+/i : install driver package.
+/u : uninstall driver package.
+/g : get driver package path.
+
+<inf-filename> : has to be in the current directory.
+
+Flags:
+DRIVER_PACKAGE_REPAIR: 0x00000001 ( 1)
+DRIVER_PACKAGE_SILENT: 0x00000002 ( 2)
+DRIVER_PACKAGE_FORCE: 0x00000004 ( 4)
+DRIVER_PACKAGE_ONLY_IF_DEVICE_PRESENT: 0x00000008 ( 8)
+DRIVER_PACKAGE_LEGACY: 0x00000010 (16)
+DRIVER_PACKAGE_DELETE_FILES: 0x00000020 (32)
© Microsoft Corporation 2002
diff --git a/setup/DIFxAPI/ReadMe.md b/setup/DIFxAPI/ReadMe.md new file mode 100644 index 00000000..cbbea926 --- /dev/null +++ b/setup/DIFxAPI/ReadMe.md @@ -0,0 +1,5 @@ +Driver Install Frameworks API (DIFxAPI) Sample +============================================== + +[Driver Install Frameworks API (DIFxAPI)](http://msdn.microsoft.com/en-us/library/windows/hardware/ff544834) Sample. + diff --git a/setup/devcon/ReadMe.md b/setup/devcon/ReadMe.md new file mode 100644 index 00000000..fbea8dca --- /dev/null +++ b/setup/devcon/ReadMe.md @@ -0,0 +1,111 @@ +Device Console (DevCon) Tool +============================ + +[DevCon](http://msdn.microsoft.com/en-us/library/windows/hardware/ff544707) is a command-line tool that displays detailed information about devices, and lets you search for and manipulate devices from the command line. DevCon enables, disables, installs, configures, and removes devices on the local computer and displays detailed information about devices on local and remote computers. DevCon is included in the WDK. + +This document explains the DevCon design, and how to use the SetupAPI and device installation functions to enumerate devices and perform device operations in a console application. For a complete description of DevCon features and instructions for using them, see the DevCon help file included with the WDK documentation in Driver Development Tools/Tools for Testing Drivers/DevCon. + +DevCon is provided in ready-to-run form in tools\\devcon. For usage, refer to the document provided with devcon.exe. DevCon is a command line utility with built-in documentation available by typing "devcon help". + +Download and extract the sample +------------------------------- + +Download the C++ sample from this page, and extract its contents. For example, you could extract to c:\\DevConSample. + +Starting in the Visual Studio 2013 WDK, you can build the sample in two ways: using the Visual Studio Integrated Development Environment (IDE) or from the command line using the Visual Studio Command Prompt window and the Microsoft Build Engine (MSBuild.exe). + +**Building the sample using Visual Studio** + +1. Open Visual Studio. From the **File** menu, select **Open Project/Solution**. Within your WDK installation, navigate to the folder where you extracted DevCon. For example c:\\DevConSample\\C++ and open the devcon.sln project file. +2. Right-click the solution in the **Solution Explorer** and select **Configuration Manager**. +3. From the **Configuration Manager**, select the **Active Solution Configuration** (for example, Windows 8.1 Debug or Windows 8.1 Release) and the **Active Solution Platform** (for example, Win32) that correspond to the type of build you are interested in. +4. From the **Build** menu, click **Build Solution** (Ctrl+Shift+B). + +Previous versions of the WDK used the Windows Build utility (Build.exe) and provided separate build environment windows for each of the supported build configurations. Starting in the Visual Studio 2013 WDK, you can use the Visual Studio Command Prompt window for all build configurations. + +**Building the sample using the command line (MSBuild)** + +1. Open a Visual Studio Command Prompt window. Click **Start** and search for **Developer Command Prompt**. If your project is under %PROGRAMFILES%, you need to open the command prompt window using elevated permissions (**Run as administrator**). From this window you can use MsBuild.exe to build any Visual Studio project by specifying the project (.VcxProj) or solutions (.Sln) file. +2. Navigate to the project directory and enter the **MSbuild** command for your target. For example, to perform a clean build of a Visual Studio driver project called devcon.vcxproj, navigate to the project directory and enter the following MSBuild command: **msbuild /t:clean /t:build .\\devcon.vcxproj**. +3. If the build succeeds, you will find the tools (devcon.exe) in the binary output directory corresponding to the target platform, for example samples\\setup\\devcon\\Windows 8.1 Debug. + +Run the sample +-------------- + +Type "devcon find \*" to list device instances of all present devices on the local machine. + +Type "devcon status @root\\rdp\_mou\\0000" to list status of the terminal server mouse driver. + +Type "devcon status \*PNP05\*" to list status of all COM ports. + +How DevCon works: + +Running "devcon help" will provide a list of commands along with short descriptions of what each command does. "devcon help \