First post, by blam666
I'm experiencing a problem when I try to set up certain older PC games that need adanced controller mappings in Windows 10 64.
I'm specifically working on getting easier setups for a bunch of games that need vjoy/ucr combination for setting up proper and reasonable controls for modern gamepads (switching axes for old flight simulators etc. that can't be done by regular mapper programs like xpadder). But the problem I have probably touches a lot of other possible usages, too.
So I try to write batch files that completely automatically start up and quit a game including enabling vjoy driver at start to enable a virtual joystick, to start and run a specific UCR profile, then after quitting the game automatically shutting down UCR and disabling the vjoy driver again. I found out the command line arguments for all of this and it's perfectly possible to do this.
But some games need something more. There is no way for some older titles to choose the right game device for controls if it's not set up as the preferred device in Windows game controller options. There is no way to choose between different controller devices in the in-game options themselves, so they will inevitably fall back to Windows "preferred device". So in these cases I want the game to accept the vjoy device as the input device they should observe for the inputs, but have to set this up manually within joy.cpl Windows menu after enabling the vjoy driver every time I start a game and have to revert it back to my physical gamepad when I'm finished playing.
When I don't turn preferred device back to my gamepad after those games, other games would again get into trouble, so I constantly have to switch this setting for this handful of games that need vjoy/ucr.
What I wanted to know is if there is any way to control Windows' "preferred device" gamepad setting within a batch file? Is there some access or command that would enable me to write a command chain that saves me all manual fiddling with that damn setting?