Would it be possible to make emclient exit gracefully when the os is shutting down.
I have a habit of not closing each app manually before restarting windows. That makes emclient always check its database when I start it again. The wait is annoying and I feel like I’m hurting the poor little thing. 
I think windows sends a exit signal to the apps for which an app should be able to react. It’s not a hard kill, sind something like unsaved changes in notepad can actually prevent the shutdown. So I’m guessing it should be possible.
No other app I know of reacts this sensible.
I’d really love to see an improvement, since I stopped using em because of this. It’s a little thing but it somehow annoys me this much. I cannot be the only one…
Would it be possible to make emclient exit gracefully when the os is shutting down.
No due the Windows OS does not allow a graceful shutdown “of an open SQL light database that eM Client uses”, so the OS then just normally kills the database and can potentially corrupt it and then cause a repair database on reopen of eM Client.
So the only option to avoid corrupting the database if you leave eM Client open, is to either “close / exit eM Client before you shutdown Windows”, or “shutdown in sleep mode” which alot of users do.
1 Like
Can’t you react on SystemEvents.SessionEnding Event and do the db shutdown yourself?
Sleep obviously doesn’t help with Windows Updates or restarts for other housekeeping reasons…
We have no support on the Windows OS. You would need to contact Microsoft tech support.
Sleep obviously doesn’t help with Windows Updates or restarts for other housekeeping reasons.
I personally use Shutdown in sleep mode with Windows 11 and eM Client V10.3 and works fine for me with updates etc.
1 Like
I guess a workaround could be to create a scheduled task that triggers on EventId 1074 (that’s shutdown) and executes a let’s say autohotkey script which closes the window. But the user shouldn’t have to do that…
EmClient does run on Windows. Why can’t it access it’s API?
EmClient does run on Windows. Why can’t it access it’s API?
We don’t have any info on the programming side of eM Client on this free community forum other than the database is SQL Lite.
1 Like
sorry, I thought the developers also read here.
But you’re right. It does actually work. EmClient actually closes gracefully on shutdown. I just didn’t notice it, since my laptop likes to crash on hibernation and there’s no way to recover from that…
Yes, we read this. eM Client should of course exit on Windows shutdown gracefully and it does in most cases. However there might be some circumstances when it does not work that well.
For diagnosing purposes we would need:
- Import the attached .reg file
- After next shutdown go to Menu > Help > Open Log Directory in eM Client
- Send us the log files with names starting with “WM Tracing”
shutdown.reg