I don't know exactly what you mean.
This is just a script to run and close it. you can choose according to your wishes. (Admin right required).
@Echo Off
:NVidia
CLS
set #name=NVDisplay.ContainerLocalSystem
sc query | Find.exe /i "%#name%" >Nul && set #Run=y || set #Run=
if defined #Run (
Echo '%#name%' is Running. Close It^?
) else (
Echo '%#name%' is Not Running. Start It^?
)
choice /n /m "(Y) Yes (N) Exit:"
if %errorlevel%==2 exit /b
if defined #Run goto :CloseIt
:RunIt
rem sc config NVDisplay.ContainerLocalSystem start=auto
net start NVDisplay.ContainerLocalSystem
start "" "C:\Program Files\NVIDIA Corporation\NVIDIAControlPanel\nvcplui.exe"
goto :NVidia
:CloseIt
net stop NVDisplay.ContainerLocalSystem
rem sc config NVDisplay.ContainerLocalSystem start= disabled
goto :NVidia
if it's just for running and closing, there's no need for sc config
. That's its function is to start automatically at startup or deactivate it.
But if you want that, remove rem
.
If you want to learn cmd, one easy-to-read reference is SS64
To just run it through the bat, pause, then close.
@Echo Off
rem sc config NVDisplay.ContainerLocalSystem start=auto
net start NVDisplay.ContainerLocalSystem
start "" "C:\Program Files\NVIDIA Corporation\NVIDIAControlPanel\nvcplui.exe"
pause
net stop NVDisplay.ContainerLocalSystem
rem sc config NVDisplay.ContainerLocalSystem start=disabled
sc query