Hi, please move if this is in the wrong place.
I need to force Windows 10 to accept two USB devices on specific COM Ports and have come up blank on how to do this via Command Line.
I can clear all 'hidden' devices to ensure the required COM Ports are free using the following code -
But when I plug in the two Devices I need to assign them to COM Port 4 & 5 respectfully .. does anyone have any idea how to go about this .. I understand it will require adjusting registry entries.
TIA for any help
I need to force Windows 10 to accept two USB devices on specific COM Ports and have come up blank on how to do this via Command Line.
I can clear all 'hidden' devices to ensure the required COM Ports are free using the following code -
Code:
@ECHO OFF
FOR %%i IN (C D E F G H I J K) DO IF EXIST %%i:\remove.cmd SET Drive=%%i:
%DRIVE%\DEVCON Find * | FIND /I /V "matching device(s)" > "%DRIVE%\DevicesExist.txt"
FOR /F "tokens=1 delims=: " %%A IN ('%DRIVE%\DEVCON FindAll * ^| FIND /I /V "%DRIVE%\matching device(s)"') DO (
TYPE "%DRIVE%\DevicesExist.txt" | FIND "%%~A" >NUL
IF ERRORLEVEL 1 %Debug% %DRIVE%\DEVCON Remove "@%%~A"
)
Del "%DRIVE%\DevicesExist.txt"
But when I plug in the two Devices I need to assign them to COM Port 4 & 5 respectfully .. does anyone have any idea how to go about this .. I understand it will require adjusting registry entries.
TIA for any help