As the title says, I’d love if someone could help me out with this current issue of mine. I need a way to have my batch file be able to auto execute an .exe as soon as a certain display is detected.
For example Acer34 35 inch, gets detected to then execute a certain .vbs, but when I — for example — switch aka turn off that display and switch to my TV for example Sony Bravia 50 inch, it’ll launch a different .vbs that is tied to that display and this on loop of course said .vbs then launching a certain .exe per batch , depending on what Displays been activated.
Display always show as Display 0 of course since either or is powered on, would appreciate the help.
This is what I have so far:
@echo OFF
::Launch the Display Profile depending on Display detected
:Display Detection
wmic desktopmonitor get Name if "desk display model" start "" ".\Launch Display Config for Desk Display Hidden.vbs"
wmic desktopmonitor get Name if "tv display model" start "" ".\Launch Display Config for TV Hidden.vbs"
if "%1"=="Launch Display Config for Desk Display" call "Launches either TV or Desk Display Config"
if "%1"=="Launch Display Config for TV" call "Launches either TV or Desk Display Config"
Goto Display Detection