Blink1Control2
Blink1Control2 copied to clipboard
Windows: cannot use PowerShell scripts as Script event source?
It seems like I cannot. Need to investigate. The error is "spawn UNKNOWN" in the event status.
See: https://stackoverflow.com/questions/10179114/execute-powershell-script-from-node-js
Also, scripts should perhaps be 'cwd'd to the directory the script is in.
One workaround is to create a CMD batch file and use:
for /f %%i in ('powershell -File %~dp0\lockstate-get.ps1') do set lockstate=%%i
To get the output of a Powershell script into a CMD batch file variable. For more details see: https://github.com/todbot/blink1/blob/master/windows/scripts/lockstate-get.ps1 https://github.com/todbot/blink1/blob/master/windows/scripts/lockstate-test.bat