SOLUTION: Windows controllers flipping between Player 1 and Player 2.
Posted: January 9th, 2019, 5:44 am
Solution summary: Uses Windows WDK tool 'devcon' to identify and disable Player2 USB device on user logoff, and re-enable upon user login. This forces Player1 controller to be detected first by the system and gain direct input/xinput P1 role.
Must be run as user with admin privileges
Skill level required: novice to moderate.
_________________________________________________________________________________________________________________________________________________________________________________________________
For a long while now I have been looking for a solution to the rock-paper-scissors bit that Windows does when it reboots on which one of my controllers get Player1. I was able to slightly mitigate this by putting Player1 controller board into the Super Speed USB ports and Player2 into the USB2.0 ports, but it only worked about 70% of the time. That's still enough to be maddening. Windows does a horrible job at handling P1, P2 with directinput / xinput game controllers. Some folks have switched to keyboard emulator boards like Dual Strike 2 to get around this, but I didn't want to sacrifice the convenience of xinput as it rewards default xbox button mappings for all games. I will outline the solution below in case this might help anyone else going crazy with this.
You need to acquire devcon which is part of the Windows Development Kit. I run Windows 10 x64, but it's available all the way back to Server 2003. You can find it here;
https://docs.microsoft.com/en-us/window ... ad-the-wdk
(Alternatively, you can try just downloading the devcon binary provided it's compatible with your windows version from the link below. Thx artik for the link)
http://delphintipz.blogspot.com/2012/07 ... abled.html
Once downloaded and installed, 'devcon' will exist in your 'C:\Program Files (x86)\Windows Kits\Tools\x64\' path. (If you have 32-bit Windows probably just C:\Program Files\)
This path will be referenced several times throughout the guide. The devcon command will not run if you are not in this path.
IDENTIFY PLAYER2 CONTROLLER
(Admittedly method 2 may be more simple, but not everyone will want to take the effort to take apart the cabinet and start unplugging things.)
METHOD 1 - Disable a controller and reboot your PC to see which one doesn't work.
From an elevated command prompt (Right Click --> Run as Administrator) run the following command from the path listed above;
devcon find usb*
This will produce a list of connected USB devices.
Mine showed up as;
USB\VID_045E&PID_C528E\14D61D5 : Xbox 360 Controller for Windows <-- This one wound up being my Player 2 controller
USB\VID_045E&PID_C528E\14D62D5 : Xbox 360 Controller for Windows
Command to disable (Must be run from path listed above);
devcon disable "@USB\VID_045E&PID_C528E\14D61D5"
You will need to replace the USB address with yours. Don't forget to add the @ and double quotes. This will disable the specified controller upon reboot and it will stay off until the opposite command is executed. (Just swap 'disable' with 'enable'.) You have a 50/50 shot.
METHOD 2 - Unplug your Player 1 controller, reboot and run the following command (from path listed above);
devcon find usb*
You should only have 1 controller showing now and should be your Player 2 controller. Take note of the USB address listed for the scripts below.
CREATING THE SCRIPTS
Make a folder somewhere of your choosing to create the 2 scripts required. I opted to create 'C:\P1 scripts'. Use notepad or your favorite text editor and input;
"C:\Program Files (x86)"\Windows Kits\Tools\x64\devcon disable "@USB\YOURADDRESSTHATYOUIDENTIFIED"
Save this script as 'P1 logoff.bat'
Repeat the process above replacing 'disable' with 'enable' and save as 'P1 logon.bat'
Now that you have your two scripts created, you need to set them to execute at the appropriate times.
Run 'gpedit.msc' and navigate to Local Computer Policy->User Configuration->Windows Settings->Scripts (Logon/Logoff)
In the right field, double click 'Logon', click 'Add' , click 'Browse', navigate to the folder you created with the scripts and select the logon script.
Do the same process for the logoff script.
You are done.
This solved the problem completely for me and my friend. Hopefully it's beneficial for you.
Must be run as user with admin privileges
Skill level required: novice to moderate.
_________________________________________________________________________________________________________________________________________________________________________________________________
For a long while now I have been looking for a solution to the rock-paper-scissors bit that Windows does when it reboots on which one of my controllers get Player1. I was able to slightly mitigate this by putting Player1 controller board into the Super Speed USB ports and Player2 into the USB2.0 ports, but it only worked about 70% of the time. That's still enough to be maddening. Windows does a horrible job at handling P1, P2 with directinput / xinput game controllers. Some folks have switched to keyboard emulator boards like Dual Strike 2 to get around this, but I didn't want to sacrifice the convenience of xinput as it rewards default xbox button mappings for all games. I will outline the solution below in case this might help anyone else going crazy with this.
You need to acquire devcon which is part of the Windows Development Kit. I run Windows 10 x64, but it's available all the way back to Server 2003. You can find it here;
https://docs.microsoft.com/en-us/window ... ad-the-wdk
(Alternatively, you can try just downloading the devcon binary provided it's compatible with your windows version from the link below. Thx artik for the link)
http://delphintipz.blogspot.com/2012/07 ... abled.html
Once downloaded and installed, 'devcon' will exist in your 'C:\Program Files (x86)\Windows Kits\Tools\x64\' path. (If you have 32-bit Windows probably just C:\Program Files\)
This path will be referenced several times throughout the guide. The devcon command will not run if you are not in this path.
IDENTIFY PLAYER2 CONTROLLER
(Admittedly method 2 may be more simple, but not everyone will want to take the effort to take apart the cabinet and start unplugging things.)
METHOD 1 - Disable a controller and reboot your PC to see which one doesn't work.
From an elevated command prompt (Right Click --> Run as Administrator) run the following command from the path listed above;
devcon find usb*
This will produce a list of connected USB devices.
Mine showed up as;
USB\VID_045E&PID_C528E\14D61D5 : Xbox 360 Controller for Windows <-- This one wound up being my Player 2 controller
USB\VID_045E&PID_C528E\14D62D5 : Xbox 360 Controller for Windows
Command to disable (Must be run from path listed above);
devcon disable "@USB\VID_045E&PID_C528E\14D61D5"
You will need to replace the USB address with yours. Don't forget to add the @ and double quotes. This will disable the specified controller upon reboot and it will stay off until the opposite command is executed. (Just swap 'disable' with 'enable'.) You have a 50/50 shot.
METHOD 2 - Unplug your Player 1 controller, reboot and run the following command (from path listed above);
devcon find usb*
You should only have 1 controller showing now and should be your Player 2 controller. Take note of the USB address listed for the scripts below.
CREATING THE SCRIPTS
Make a folder somewhere of your choosing to create the 2 scripts required. I opted to create 'C:\P1 scripts'. Use notepad or your favorite text editor and input;
"C:\Program Files (x86)"\Windows Kits\Tools\x64\devcon disable "@USB\YOURADDRESSTHATYOUIDENTIFIED"
Save this script as 'P1 logoff.bat'
Repeat the process above replacing 'disable' with 'enable' and save as 'P1 logon.bat'
Now that you have your two scripts created, you need to set them to execute at the appropriate times.
Run 'gpedit.msc' and navigate to Local Computer Policy->User Configuration->Windows Settings->Scripts (Logon/Logoff)
In the right field, double click 'Logon', click 'Add' , click 'Browse', navigate to the folder you created with the scripts and select the logon script.
Do the same process for the logoff script.
You are done.
This solved the problem completely for me and my friend. Hopefully it's beneficial for you.