I am trying to use devcon in order to install/remove a device using a .inf driver on windows 7. The device is a touch screen that sends different data on windows xp or 7. I inserted the devcon calls into a batch file and call the file from a c# app.
devcon.exe remove "USB\VID_06D3&PID_6400"
devcon.exe rescan
devcon.exe install final.inf "USB\VID_06D3&PID_6400"
The install process works fine but the device sends data using windows xp format. If I try to run the same commands using a command prompt the device works as expected using windows 7 data format. I have just tried to use the batch outside the c# app with admin privileges but the behaviour is the same. What can be differences between calling the batch file and executing the commands via command prompt?
Thanks in advance.
I solved the issue. The problem is that using batch file the rescan and install operations are performed immediately one after the other and Windows has no time to communicate to the device. The device that doesn't receive info on the current OS uses the default set (Windows XP).