When an application displays a message in the form you posted when you run it, i.e., devcon [-r][-m:\\machine] <command> [<arg>..]
it usually means you did not use the proper syntax for the command, so it is trying to help you by showing you the correct syntax. When things appear in brackets, i.e., between [
and ]
it usually means they are optional. E.g., [-r]
means you don't always enter -r
, but only when it is needed for a particular operation that can be performed by the command. That option will cause devcon to reboot the system, if a reboot is needed after the command is run. Since you are running the command on the system on which you wish it to perform its operations, you don't need to specify -m:\\machine
, and it is put between brackets to show that argument to the command is optional.
The install and remove options to devcon in the lines from the batch file that you posted are valid options as shown at Device Console (DevCon.exe) Commands. I don't know whether what you specified in the
devcon remove command is valid for your system, but, perhaps it might help to check on whether the version of devcon you are using is the appropriate one for your version of Windows as dxiv suggested in his comment where he noted:
under x64 Windows you must run the 64-bit devcon.exe.
You can check whether you have a 32-bit or 64-bit version of Windows 10 by running the command wmic os get OSArchitecture
at a command prompt. You can check whether you have a 32-bit or 64-bit version of an application, such as devcon.exe
by right-clicking on it in the Windows File Explorer, then choosing Properties and then clicking on the Compatibility tab. Then check the check box for "Run this program in compatibility mode for". If you see Windows XP listed as an option, then the program is a 32-bit program, not a 64-bit program, since Windows XP compatibility mode is not an option for a 64-bit application.
pause
at the end.C:\Users\JDoe\Documents\devcon remove root\mcamvusb
, substituting the appropriate directory.devcon.exe
- under x64 Windows you must run the 64-bit devcon.exe. See Quick Method to install DevCon.exe? for options to get it.