Closed petitchamp closed 3 months ago
Yes, I can confirm that this happens.
The display name (e.g. \\.\DISPLAY1
) is automatically assigned by Windows. Apparently, it can change whenever Windows feels like it. Note: this is a logical construct of the combination of a graphics adapter, it's connector, and the target display device.
The display device name (e.g. DELL P2422H
) and device path (e.g. \\?\DISPLAY#DELA1C4#5&1f90b8c9&0&UID4354#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}
) are stable, as those are representatives of the real hardware.
I recommend using the device name or device path (in case the device name is not unique):
ToggleDisplay.exe toggle "\\?\DISPLAY#DELA1C4#5&1f90b8c9&0&UID4352#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}"
thank you for your reply. It works much better with device path
I have 3 monitors when I run ToogleDisplay list
But after disabling display 2 and 3, their ids changed
call toggledisplay DISABLE \\.\DISPLAY2
call timeout /T 5
call toggledisplay DISABLE \\.\DISPLAY3