Executing stuff on shutdown, plus standby stuff.
Executing stuff on shutdown, plus standby stuff.
What's the exact event to use for triggering an action at shutdown? The log gets cleared...
Also, is there some function to stall standby and shutdown procedures, in order to execute specific actions?
Also, is there some function to stall standby and shutdown procedures, in order to execute specific actions?
Re: Executing stuff on shutdown, plus standby stuff.
Anyone? I suppose it's a common enough need... and to clarify, the shutdown I'm referring to would be initiated by standard Windows procedures, otherwise my question wouldn't have any meaning.
Re: Executing stuff on shutdown, plus standby stuff.
I hate to insist but it's a simple question. Maybe there is not a specific event, maybe it's not possible to delay standby, I don't know.
Please help me.
Please help me.

Re: Executing stuff on shutdown, plus standby stuff.
Typically you would define a Macro.
The macro would be triggered by an event (whatever you specify - keypress etc.)
You would define multiple actions for the Macro (whatever action you want)
The last action would be System:ShutDown
Hope that helps
The macro would be triggered by an event (whatever you specify - keypress etc.)
You would define multiple actions for the Macro (whatever action you want)
The last action would be System:ShutDown
Hope that helps
Re: Executing stuff on shutdown, plus standby stuff.
Argh... I don't want to create a macro to shutdown the PC. I want to create a macro that gets executed when the PC is shutdown. Shutdown is the event in this case, not the action inside the macro.
I want to be able to shutdown the machine normally (Start, etc.) and have EventGhost detect this and execute something before the Shutdown happens.
I want to be able to shutdown the machine normally (Start, etc.) and have EventGhost detect this and execute something before the Shutdown happens.
Re: Executing stuff on shutdown, plus standby stuff.
Ahh.. I played around with it. I could create an event called System.QuerySuspend . Associated Action was "Start Program" in the options I checked "Wait till application is terminated". My action does get triggered when system is suspended however there seems to be some timeout built in too because it doesn't wait forever. So if the invoked application stays alive for too long (~15 seconds) the system is suspended anyway.
So bottom line is that if you have some quick tasks to execute which take less than 15 seconds to execute and then terminate, you could use this method. I couldn't find something similar for shutdown though.
So bottom line is that if you have some quick tasks to execute which take less than 15 seconds to execute and then terminate, you could use this method. I couldn't find something similar for shutdown though.
Re: Executing stuff on shutdown, plus standby stuff.
Yeah, I have used successfully System.QuerySuspend, because when the system wakes up the log is still there. The problem with Shutdown is that EventGhost exits and the log is deleted, so I don't know which event to target for my action.nkapur wrote:Ahh.. I played around with it. I could create an event called System.QuerySuspend . Associated Action was "Start Program" in the options I checked "Wait till application is terminated". My action does get triggered when system is suspended however there seems to be some timeout built in too because it doesn't wait forever. So if the invoked application stays alive for too long (~15 seconds) the system is suspended anyway.
So bottom line is that if you have some quick tasks to execute which take less than 15 seconds to execute and then terminate, you could use this method. I couldn't find something similar for shutdown though.
The action I need is fast enough for suspend (which is faster than shutdown) so I should not have problems in that regard. If only I could get evidence of the right event to trigger it.
- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
Re: Executing stuff on shutdown, plus standby stuff.
System.OnEndSession
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
Re: Executing stuff on shutdown, plus standby stuff.
Great! Can I add that manually, without needing to drag and drop from the log window? Meaning, can I create manually an event? Maybe this is in the wiki, I haven't checked yet.Bitmonster wrote:System.OnEndSession
Re: Executing stuff on shutdown, plus standby stuff.
Yes, right click your macro and add Event. Give the event the name you want, in this case "System.OnEndSession".
Re: Executing stuff on shutdown, plus standby stuff.
To execute task when windows is shutting down, for win 7 x64 I use :
Task.Deactivated.Desktop
Like turning off TV and amp with HDMI-CEC.
A quick trick to grab logs with for win 7 while doing a shutdown.When you open lots of programs before shutting down, windows will ask you if you want to force shutdown or not by showing you a list of running process. Press cancel before it automatically clear the list and go back in even ghost. You'll see what you are searching for in the logs, since it's still running.
Task.Deactivated.Desktop
Like turning off TV and amp with HDMI-CEC.
A quick trick to grab logs with for win 7 while doing a shutdown.When you open lots of programs before shutting down, windows will ask you if you want to force shutdown or not by showing you a list of running process. Press cancel before it automatically clear the list and go back in even ghost. You'll see what you are searching for in the logs, since it's still running.
Re: Executing stuff on shutdown, plus standby stuff.
Main.OnClose works on my computer, while System.OnEndSession doesn't
-
- Experienced User
- Posts: 133
- Joined: Thu Dec 10, 2015 12:09 am
Re: Executing stuff on shutdown, plus standby stuff.
Hi there Foune. Have you tried Main.OnEndSession instead of System.OnEndSession to get events to fire when windows shuts down? It's working for me on Windows 10 64 bit. Here's a thread with some info that might help. http://www.eventghost.org/forum/viewtop ... f=2&t=2011Foune wrote:Main.OnClose works on my computer, while System.OnEndSession doesn't
- kgschlosser
- Site Admin
- Posts: 5508
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Executing stuff on shutdown, plus standby stuff.
Here are the list of events that are generated relating to logging off and on and suspend types of things
Main.OnInit
Main.OnClose
Main.OnEndSession
System.ConsoleConnect
System.ConsoleDisconnect
System.RemoteConnect
System.RemoteDisconnect
System.SessionLogon
System.SessionLogoff
System.SessionLock
System.SessionUnlock
System.SessionRemoteControl
System.Suspend
System.Resume
System.ResumeAutomatic
System.AwayMode.Entering
System.AwayMode.Exiting
Main.OnInit
Main.OnClose
Main.OnEndSession
System.ConsoleConnect
System.ConsoleDisconnect
System.RemoteConnect
System.RemoteDisconnect
System.SessionLogon
System.SessionLogoff
System.SessionLock
System.SessionUnlock
System.SessionRemoteControl
System.Suspend
System.Resume
System.ResumeAutomatic
System.AwayMode.Entering
System.AwayMode.Exiting