Disable Monitor Through Batch

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Zenious
Posts: 2
Joined: 13 Feb 2017 11:04

Disable Monitor Through Batch

#1 Post by Zenious » 13 Feb 2017 11:09

hey guys,

I've currently been trying to dabble in some batch coding to disable a monitor every so often. I currently have 2 monitors and a tv. The tv is what my significant other and I use to watch Netflix/Movies. Obviously, I do not want it enabled all the time. I tried using DevCon tool to find my TV's ID and to disable it, but it does not seem to be working. I also noticed that disabling the TV through device manager does not do anything.

I believe the reason for this is because I have NVIDIA control panel installed and the only way to disable the monitor is through the control panel. Is there a way to create a batch file to disable a monitor through the NVIDIA control panel? I just want to create two batch files, one to enable and one to disable this TV. I believe this to be a somewhat specific case and can understand if it is not feasible.

This is what I currently had in my Batch file, but it was not working:

Code: Select all

devcon.exe disable "DISPLAY\HWP3289\5&1DEDD19&0&UID8449"
pause


The long string is just the device name I got from running

Code: Select all

devcon.exe findall * > output.txt


Any assistance would be greatly appreciate.

Thanks,
Zen

aGerman
Expert
Posts: 3063
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Disable Monitor Through Batch

#2 Post by aGerman » 13 Feb 2017 13:48

Do you use the right target build for your system? The 32 bit build will not work on a 64 bit system.

Steffen

Zenious
Posts: 2
Joined: 13 Feb 2017 11:04

Re: Disable Monitor Through Batch

#3 Post by Zenious » 13 Feb 2017 16:35

aGerman wrote:Do you use the right target build for your system? The 32 bit build will not work on a 64 bit system.

Steffen


I definitely made sure to do this. Installing Visual Studio came with both the 32 bit and 64 bit version. I run the 64 bit version, and it says that the monitor was successfully disabled, but it is still working i.e. I can see pictures/video like it wasn't even disabled.

I believe NVIDIA control panel is the culprit here and overriding me disabling a monitor. Even if I specifically go into device manager and disable the monitors, they continue running and receiving data from my GPU as if nothing happened.

aGerman
Expert
Posts: 3063
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Disable Monitor Through Batch

#4 Post by aGerman » 13 Feb 2017 16:43

Zenious wrote:Even if I specifically go into device manager and disable the monitors, they continue running and receiving data from my GPU as if nothing happened.

I'm afraid in that case you are out of luck :(

Post Reply