NOTE: I need to come back and edit this.. but laptop battery dying.

Hi Dick,
I think someone has tackled the Digital Logger switch already, and there is a bit of code in the SampleShutdown.js script for it.

One handy thing I'm doing if things are really bad with power, is a nice PC shutdown, where at the end of the script, I'm invoking the windows shutdown command, and it will make a Windows event log entry in teh System Log, with an Information log entry with a comment explaining the reason.

The essentials are:

// Modify the shutdown parameters per below.
// The /t parameter is 600 seconds = 10 minutes, should be enough time to park scope, close roof, etc.
// The /c paramater is a comment explaining why shutdown, will be in the Windows Event Log System Log
// the p:06:12 says its a planned shutdown due to Power Failure in the Environment.

var shell = new ActiveXObject("WScript.Shell");"cmd /c shutdown /s /t 600 /c "RigRunner reported Low Voltage" /d p:06:12");

and do whatever else you need.