diff options
Diffstat (limited to 'setup')
| -rw-r--r-- | setup/devcon/devcon.cpp | 7 | ||||
| -rw-r--r-- | setup/devcon/devcon.rc | 8 | ||||
| -rw-r--r-- | setup/devcon/devcon.sln | 8 | ||||
| -rw-r--r-- | setup/devcon/devcon.vcxproj | 74 | ||||
| -rw-r--r-- | setup/devcon/msg.mc | 50 |
5 files changed, 62 insertions, 85 deletions
diff --git a/setup/devcon/devcon.cpp b/setup/devcon/devcon.cpp index b1bdbf2a..7e7e88a7 100644 --- a/setup/devcon/devcon.cpp +++ b/setup/devcon/devcon.cpp @@ -1149,7 +1149,12 @@ Return Value: for(dispIndex = 0;DispatchTable[dispIndex].cmd;dispIndex++) { if ((_tcsicmp(cmd,DispatchTable[dispIndex].cmd) == 0) && (argc >= firstArg)) { - retval = DispatchTable[dispIndex].func(baseName,machine,flags,argc-firstArg,argv+firstArg); + if (argc == firstArg) { + retval = DispatchTable[dispIndex].func(baseName,machine,flags,0,NULL); + } else { + retval = DispatchTable[dispIndex].func(baseName,machine,flags,argc-firstArg,argv+firstArg); + } + switch(retval) { case EXIT_USAGE: CommandUsage(baseName,DispatchTable[dispIndex].cmd); diff --git a/setup/devcon/devcon.rc b/setup/devcon/devcon.rc index ead46f85..c9cccb55 100644 --- a/setup/devcon/devcon.rc +++ b/setup/devcon/devcon.rc @@ -27,11 +27,11 @@ STRINGTABLE DISCARDABLE // Version resources // #include <ntverp.h> -#define VER_FILETYPE VFT_DLL +#define VER_FILETYPE VFT_APP #define VER_FILESUBTYPE VFT2_UNKNOWN -#define VER_FILEDESCRIPTION_STR "Windows Setup API" -#define VER_INTERNALNAME_STR "SETUPAPI.DLL" -#define VER_ORIGINALFILENAME_STR "SETUPAPI.DLL" +#define VER_FILEDESCRIPTION_STR "Device Console" +#define VER_INTERNALNAME_STR "DevCon.exe" +#define VER_ORIGINALFILENAME_STR "DevCon.exe" #include <common.ver> #include "msg.rc" diff --git a/setup/devcon/devcon.sln b/setup/devcon/devcon.sln index 5cd951c6..629ab476 100644 --- a/setup/devcon/devcon.sln +++ b/setup/devcon/devcon.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0 @@ -8,23 +8,17 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|ARM64 = Debug|ARM64 - Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Release|ARM64 = Release|ARM64 - Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Debug|ARM64.ActiveCfg = Debug|ARM64 {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Debug|ARM64.Build.0 = Debug|ARM64 - {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Debug|Win32.ActiveCfg = Debug|Win32 - {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Debug|Win32.Build.0 = Debug|Win32 {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Debug|x64.ActiveCfg = Debug|x64 {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Debug|x64.Build.0 = Debug|x64 {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Release|ARM64.ActiveCfg = Release|ARM64 {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Release|ARM64.Build.0 = Release|ARM64 - {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Release|Win32.ActiveCfg = Release|Win32 - {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Release|Win32.Build.0 = Release|Win32 {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Release|x64.ActiveCfg = Release|x64 {14EDBD07-E4CD-4BD8-82CC-F2840C160570}.Release|x64.Build.0 = Release|x64 EndGlobalSection diff --git a/setup/devcon/devcon.vcxproj b/setup/devcon/devcon.vcxproj index b7b15302..e6885392 100644 --- a/setup/devcon/devcon.vcxproj +++ b/setup/devcon/devcon.vcxproj @@ -5,18 +5,10 @@ <Configuration>Debug</Configuration> <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> @@ -30,7 +22,7 @@ <ProjectGuid>{14EDBD07-E4CD-4BD8-82CC-F2840C160570}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{FDCF5960-709F-48C2-A9D0-9F3F6BE0CAC9}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -50,14 +42,6 @@ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> - <DriverType /> - <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> - <ConfigurationType>Application</ConfigurationType> - </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> @@ -66,14 +50,6 @@ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> - <DriverType /> - <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> - <ConfigurationType>Application</ConfigurationType> - </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> @@ -92,15 +68,9 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> - </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> - </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> @@ -111,15 +81,9 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>devcon</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <TargetName>devcon</TargetName> - </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>devcon</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <TargetName>devcon</TargetName> - </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>devcon</TargetName> </PropertyGroup> @@ -159,24 +123,6 @@ <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;kernel32.lib;ntdll.lib;ole32.lib;setupapi.lib;shell32.lib;user32.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <TreatWarningAsError>true</TreatWarningAsError> - <WarningLevel>Level4</WarningLevel> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - <ExceptionHandling> - </ExceptionHandling> - </ClCompile> - <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </Midl> - <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ResourceCompile> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;kernel32.lib;ntdll.lib;ole32.lib;setupapi.lib;shell32.lib;user32.lib</AdditionalDependencies> - </Link> - </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> @@ -195,24 +141,6 @@ <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;kernel32.lib;ntdll.lib;ole32.lib;setupapi.lib;shell32.lib;user32.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <TreatWarningAsError>true</TreatWarningAsError> - <WarningLevel>Level4</WarningLevel> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - <ExceptionHandling> - </ExceptionHandling> - </ClCompile> - <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </Midl> - <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - </ResourceCompile> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;kernel32.lib;ntdll.lib;ole32.lib;setupapi.lib;shell32.lib;user32.lib</AdditionalDependencies> - </Link> - </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> diff --git a/setup/devcon/msg.mc b/setup/devcon/msg.mc index ca348bde..110bb2f8 100644 --- a/setup/devcon/msg.mc +++ b/setup/devcon/msg.mc @@ -25,6 +25,10 @@ For more information, type: %1 help %2 ;// MessageId=60100 SymbolicName=MSG_HELP_LONG Language=English +------------------------------------------------------------------------------ +| Devcon is a code sample intended for learning purposes. | +| Use PnpUtil for optimal functionality/compatiblity with this OS. | +------------------------------------------------------------------------------ Device Console Help: %1 [-r] [-m:\\<machine>] <command> [<arg>...] -r Reboots the system only when a restart or reboot is required. @@ -54,6 +58,8 @@ Lists all device setup classes. Valid on local and remote computers. <machine> Specifies a remote computer. Class entries have the format <name>: <descr> where <name> is the class name and <descr> is the class description. + +Recommended Equivalent: pnputil /enum-classes . MessageId=60201 SymbolicName=MSG_CLASSES_SHORT Language=English @@ -80,6 +86,8 @@ Lists all devices in the specified setup classes. Valid on local and remote comp <class> Specifies a device setup class. Device entries have the format <instance>: <descr> where <instance> is a unique instance of the device and <descr> is the device description. + +Recommended Equivalent: pnputil /enum-devices /class <class> . MessageId=60301 SymbolicName=MSG_LISTCLASS_SHORT Language=English @@ -130,6 +138,8 @@ Examples of <id>: including the asterisk.) Device entries have the format <instance>: <descr> where <instance> is the unique instance of the device and <descr> is the device description. + +Recommended Equivalent: pnputil /enum-devices . MessageId=60401 SymbolicName=MSG_FIND_SHORT Language=English @@ -169,6 +179,8 @@ Examples of <id>: including the asterisk.) Device entries have the format <instance>: <descr> where <instance> is the unique instance of the device and <descr> is the description. + +Recommended Equivalent: pnputil /enum-devices . MessageId=60407 SymbolicName=MSG_FINDALL_SHORT Language=English @@ -190,6 +202,8 @@ Examples of <id>: @ISAPNP\*\* - Instance ID with wildcards (@ prefixes instance ID) '*PNP0501 - Hardware ID with apostrophe (' prefixes literal match - matches exactly as typed, including the asterisk.) + +Recommended Equivalent: pnputil /enum-devices . MessageId=60409 SymbolicName=MSG_STATUS_SHORT Language=English @@ -210,6 +224,8 @@ Examples of <id>: @ISAPNP\*\* - Instance ID with wildcards (@ prefixes instance ID) '*PNP0501 - Hardware ID with apostrophe (' prefixes literal match - matches exactly as typed, including the asterisk.) + +Recommended Equivalent: pnputil /enum-drivers /files . MessageId=60411 SymbolicName=MSG_DRIVERFILES_SHORT Language=English @@ -232,6 +248,8 @@ Examples of <id>: @ISAPNP\*\* - Instance ID with wildcards (@ prefixes instance ID) '*PNP0501 - Hardware ID with apostrophe (' prefixes literal match - matches exactly as typed, including the asterisk.) + +Recommended Equivalent: pnputil /enum-devices /resources . MessageId=60413 SymbolicName=MSG_RESOURCES_SHORT Language=English @@ -253,6 +271,8 @@ Examples of <id>: @ISAPNP\*\* - Instance ID with wildcards (@ prefixes instance ID) '*PNP0501 - Hardware ID with apostrophe (' prefixes literal match - matches exactly as typed, including the asterisk.) + +Recommended Equivalent: pnputil /enum-devices /deviceids . MessageId=60415 SymbolicName=MSG_HWIDS_SHORT Language=English @@ -275,6 +295,8 @@ Examples of <id>: @ISAPNP\*\* - Instance ID with wildcards (@ prefixes instance ID) '*PNP0501 - Hardware ID with apostrophe (' prefixes literal match - matches exactly as typed, including the asterisk.) + +Recommended Equivalent: pnputil /enum-devices /stack . MessageId=60417 SymbolicName=MSG_STACK_SHORT Language=English @@ -299,6 +321,8 @@ Examples of <id>: @ISAPNP\*\* - Instance ID with wildcards (@ prefixes instance ID) '*PNP0501 - Hardware ID with apostrophe (' prefixes literal match - matches exactly as typed, including the asterisk.) + +Recommended Equivalent: pnputil /enable-device <id> . MessageId=60501 SymbolicName=MSG_ENABLE_SHORT Language=English @@ -338,6 +362,8 @@ Examples of <id>: @ISAPNP\*\* - Instance ID with wildcards (@ prefixes instance ID) '*PNP0501 - Hardware ID with apostrophe (' prefixes literal match - matches exactly as typed, including the asterisk.) + +Recommended Equivalent: pnputil /disable-device <id> . MessageId=60601 SymbolicName=MSG_DISABLE_SHORT Language=English @@ -377,6 +403,8 @@ Examples of <id>: @ISAPNP\*\* - Instance ID with wildcards (@ prefixes instance ID) '*PNP0501 - Hardware ID with apostrophe (' prefixes literal match - matches exactly as typed, including the asterisk.) + +Recommended Equivalent: pnputil /restart-device <id> . MessageId=60701 SymbolicName=MSG_RESTART_SHORT Language=English @@ -404,6 +432,8 @@ MessageId=60800 SymbolicName=MSG_REBOOT_LONG Language=English %1 %2 Reboots the local computer as part of a planned hardware installation. + +Recommended Equivalent: shutdown /r /t 0 . MessageId=60801 SymbolicName=MSG_REBOOT_SHORT Language=English @@ -598,6 +628,9 @@ Installs the specified device manually. Valid only on the local computer. <inf> Specifies an INF file with installation information for the device. <hwid> Specifies a hardware ID for the device. -r Reboots the system only when a restart or reboot is required. + +Recommended Equivalent: devgen /add /bus ROOT /hardwareid <hwid> + pnputil /add-driver <inf> /install . MessageId=61001 SymbolicName=MSG_INSTALL_SHORT Language=English @@ -620,6 +653,7 @@ Valid only on the local computer. (To reboot when necesary, Include -r .) -r Reboots the system only when a restart or reboot is required. <inf> Specifies an INF file with installation information for the devices. <hwid> Specifies the hardware ID of the devices. +Recommended Equivalent: pnputil /add-driver <inf> /install . MessageId=61101 SymbolicName=MSG_UPDATE_SHORT Language=English @@ -643,6 +677,8 @@ Specify -r to reboot automatically if needed. All devices that match <hwid> are updated. Unsigned installs will fail. No UI will be presented. + +Recommended Equivalent: pnputil /add-driver <inf> /install . MessageId=61105 SymbolicName=MSG_UPDATENI_SHORT Language=English @@ -662,6 +698,8 @@ Adds (installs) a third-party (OEM) driver package. This command will only work on the local machine. <inf> is a full path to the INF of the Driver Package that will be installed on this machine. + +Recommended Equivalent: pnputil /add-driver <inf> . MessageId=61108 SymbolicName=MSG_DPADD_SHORT Language=English @@ -677,6 +715,8 @@ if it is in use by a device. <inf> is the name of a published INF on the local machine. This is the value returned from dp_add and dp_enum. + +Recommended Equivalent: pnputil /delete-driver <inf> . MessageId=61110 SymbolicName=MSG_DPDELETE_SHORT Language=English @@ -689,6 +729,8 @@ Lists the third-party (OEM) driver packages installed on this machine. This command will only work on the local machine. Values returned from dp_enum can be sent to dp_delete to be removed from the machine. + +Recommended Equivalent: pnputil /enum-drivers . MessageId=61112 SymbolicName=MSG_DPENUM_SHORT Language=English @@ -794,6 +836,8 @@ Examples of <id>: @ISAPNP\*\* - Instance ID with wildcards (@ prefixes instance ID) '*PNP0501 - Hardware ID with apostrophe (' prefixes literal match - matches exactly as typed, including the asterisk.) + +Recommended Equivalent: pnputil /remove-device <id> . MessageId=61201 SymbolicName=MSG_REMOVE_SHORT Language=English @@ -827,6 +871,8 @@ Examples of <id>: @ISAPNP\*\* - Instance ID with wildcards (@ prefixes instance ID) '*PNP0501 - Hardware ID with apostrophe (' prefixes literal match - matches exactly as typed, including the asterisk.) + +Recommended Equivalent: pnputil /remove-device <id> . MessageId=61206 SymbolicName=MSG_REMOVEALL_SHORT Language=English @@ -842,6 +888,8 @@ Devcon Rescan Command Directs Plug and Play to scan for new hardware. Valid on a local or remote computer. %1 [-m:\\<machine>] %2 <machine> Specifies a remote computer. + +Recommended Equivalent: pnputil /scan-devices . MessageId=61301 SymbolicName=MSG_RESCAN_SHORT Language=English @@ -878,6 +926,8 @@ Examples of <id>: @ISAPNP\*\* - Instance ID with wildcards (@ prefixes instance ID) '*PNP0501 - Hardware ID with apostrophe (' prefixes literal match - matches exactly as typed, including the asterisk.) + +Recommended Equivalent: pnputil /enum-devices /drivers . MessageId=61401 SymbolicName=MSG_DRIVERNODES_SHORT Language=English |
