Remote Shutdown PC Using EXEC on Windows PC OpenHAB

@Celaeno1, Sadly, still no success. Must be some obscure permissions setting burried deep somewhere in the bowels of Windows. Starting to think I’ll just have to resign myself to restarting it manually :confused:

As far as I understand you do not any error or warning message in openhab logs any longer.
What about Windows system event logs on the host you run OH and on the host you would like to shutdown ?

@Wolfgang_S, yes that’s correct - no errors in the OH log since the changes that Alex suggested here:

So please create another batch, called e.g.: execute.bat
Content of execute.bat :

C:\Progra~1\openHAB2\conf\scripts\shut-d~1.lnk

your rule:

val String results1 executeCommandLine("C:\\Progra~1\\OpenHAB2\\conf\\scripts\\execute

To be honest I had never opened the windows logs before… but it seems that there are three entries with the first executeCommandLine attempt: “A logon was attempted using explicit credentials.” (Event ID 4648) followed by “Special privileges assigned to new logon.” (Event ID 4672 and specific privileges as in the screenshot below) and finally “An account was successfully logged on.” (Event ID 4624). With every subsequent executeCommandLine attempt there are slightly different entries… “An account was logged on.” (event ID 4624) followed by “An account was logged off.” (event ID 4634) followed by a repeat log on (event ID 4624) and log off (event ID 4634).

Here is the screenshot for the second event above regarding special privileges the first time I run the executeCommandLine rule: