I'm trying to run some old software that refuses to launch (an issue for many users) unless the "HID-compliant consumer control device" devices, under Windows 10's "Device Manager", are disabled. I was able to do so with the simple batch script (using devcon):
devcon.exe /r disable @"PLACEHOLDER*"
however I was wondering if its possible to then run
devcon.exe /r enable @"PLACEHOLDER*"
upon exit of the application.
I attempted a little Power-Shell script to try and make my initial script more universal:
$id = (Get-CimInstance Win32_PnPEntity |
where caption -match 'HID-compliant consumer control device').pnpDeviceID
$ppid = "{0}{1}" -f '@',$id
Set-Location c:\PLACEHOLDER
Devcon status $ppid
Devcon enable $ppid
Devcon status $ppid
However this was met with a multitude of errors such as the script not being signed when attempting to test within "PowerShell ISE".
Any insight or assistance anyone can offer would be greatly appreciated.