Turning on and off the TV using the USB-CEC Adapter or NUC-CEC adapter can be achieved by writing batch files calling this cec-client.exe. The contents of the batch file are given below:
Turning ON (from standby or when TV is on an alternate source)
echo as | "C:\Program Files (x86)\Pulse-Eight\USB-CEC Adapter\cec-client.exe" -s -p 1
Turning OFF (to standby)
echo standby 0 | "C:\Program Files (x86)\Pulse-Eight\USB-CEC Adapter\cec-client.exe" -s -p 1
The above batch file commands are assuming you have installed cec-client in C:\Program Files (x86)\Pulse-Eight\USB-CEC Adapter\. If not please enter the correct directory.
The last argument "1" signifies the HDMI port of the TV. If you have connected to HDMI port 3 (for example) the arguments are -s -p 3
To turn the TV on using USB-CEC Adapter during PC startup, please save the "Turn ON" batch file in the Startup folder. It is usually located in:
To turn the TV off during shutdown, please add a shutdown command to the batch file (shown below) and run this batch file to shutdown your PC.
shutdown -s -t 5
Where the "5" signifies the number of seconds to wait before shutting down. You can adjust this number to your convenience.