PDA

View Full Version : How to spawn/start a batch file?


Don604
Feb 18, 2011, 06:40 PM
I need to be able to start a batch file, but it must then run completely independent of HCA. This means HCA cannot "wait" for it complete.

In XP this would mean using a "Start" command, but I have not been able to figure out how to do this, and it's not for trying.

The application is to start a PC reboot scenario, and allow HCA to do a clean shutdown. As long as the batch file is running and HCA is waiting, then I suspect it is blocking clean shutdown, and consequently all the "flag" values are being lost to the previous system save. The goal is to start the task, then during shutdown the flags would be saved.

Alternately, if someone knows how to force a "save" from a program-script within HCA, then that would be a great alternate approach.

The ultimate goal is not necessarily a clean reboot, but rather the preservation of "flag" values up to within moments of the reboot (not days or hours). I need this to track motion activity which I use for multiple purposes in controlling my house using HCA (ver 9 so far).

Thanks, Don

mjl
Mar 10, 2011, 06:34 PM
In the HCA Properties menu, Startup Tab, Restart Section, there is a check box for "This computer is connected to an Uninterruptible Power Supply (UPS), and and a check box for "Write restoration state file only when necessary. ..." Try UNchecking both of those boxes and saving the home design file. - then HCA should frequently write the state file (which includes the current flag settings) to the hard drive. That might accomplish what you want without having to spawn a batch file.

One more thing - in the View->Flag Inventory menu, each flag individually has a setting regarding what to set it to when the home file is loaded - you can force each flag to have a specific setting at startup, or to load the last saved value. This gives you a lot of control in case there are some flags which you don't want to use the saved value.