There are two batch files. Need to add a condition to the first file if the process is running nvcplui.exe then nothing, and if it is not running, then the second file (or the code from it) will be applied. I am far from programming, so I will be grateful for the finished version.
1 bat
sc config NVDisplay.ContainerLocalSystem start=autonet start NVDisplay.ContainerLocalSystemstart "" "C:\Program Files\NVIDIA Corporation\NVIDIAControlPanel\nvcplui.exe"
2 bat
net stop NVDisplay.ContainerLocalSystemsc config NVDisplay.ContainerLocalSystem start= disabled