javiergutierrezchamorro / nikkhokkho

Software Javier Gutiérrez Chamorro (Guti)
http://nikkhokkho.sourceforge.net/
7 stars 4 forks source link

RFE: More Options for System Shutdown #11

Open TPS opened 8 years ago

TPS commented 8 years ago

@javiergutierrezchamorro I would love to use ShutdownWhenDone=true, but just a plain complete shutdown isn't useful to me. Can there be a modifying option to Hibernate, Sleep, Reboot, or Sign Out, as well? Also, this used to be a UI option, I think, but that seems to have gone missing. Could that return someplace, along with the above?

Semi-related to the above, but moreso to the future pause-&-resume feature, could that function persist across program restart or device reboot? Sometimes, I'm running a rather long optimization, but Windows wants to reboot, usually due to a security update. In such a case, it'd be very useful if FileOptimizer were to automatically detect Windows shutdown, save state, &, when restarted (optionally automatically on reboot), pick up where it left off.

TPS commented 8 years ago

@javiergutierrezchamorro Thanks for adding this to the ToDo!

TPS commented 8 years ago

@javiergutierrezchamorro I would like to verify, when running multiple instances (#13-ish), this shutdown, &c, triggers when only the last instance is done, not the first? The reason I ask, there's a long-standing annoyance that, when any of the \Plugins## tools are being run on the system, when closing a FileOptimizer instance, it asks about closing all those -- whether or not they belong to that instance! I hope it doesn't do the same via shutdown mechanism!

javiergutierrezchamorro commented 8 years ago

Unfortunately it will happen when first instance finished. FileOptimizer was not designed to be multiinstance, but after that I allowed it raising the warning. Reason is that everything, starting from the INI file assumes there are no other instances.

In the case of plugins, they are killed when optimization stops, no matter who launched them. My ToDo list, wants to allow full multiinstance support, but it is not a simple task.

TPS commented 8 years ago

Actually, other processes don't die, unless they're children of that instance.… It just says they will, at least from Vista onwards, probably due to some Windows permissions thing. I've no idea what happens when running 1 instance as Administrator, & then closing that out while other processes are running: That might close others.

As for difficulty in multi-instance, would a cheap way to do it be to increment/decrement a global "Running Instances" count? That could also be adapted for when you develop multi-threaded/-process optimization.