eM Client fails to start with message 'that eM Client was not closed correctly last time . . .'

I’m getting the error message when I try to start eM Client.  eMC checks for corrupted database and inconsistent data but doesn’t find anything.  Nevertheless, it doesn’t open so i can’t even restore a backup.  I’ve tried uninstalling/re-installing with no success and just cannot get the program to ‘open’ so that I can set anything up or restore data.  I’ve tried renaming C:_Users_\AppData\Roaming\eM Client but to no effect.  I’ve used this program for a couple of years or more without problems and nothing else on my PC has changed.  I’m using Kaspersky and Malwarebytes but I’ve used them since before adopting eM Client.

Any ideas as to what has happened and what i can do about it.

It may be that your antivirus has locked one of the database files for some reason. That is usually mentioned in the error message, probably in the last few lines, that a file is not accessible. Maybe disable Kaspersky and then try open eM Client again.

Also check in your task manager, as there may be an instance of eM Client running. Restarting Windows can correct that.

If you can’t open eM Client and want to restore, use the following command:
"C:\Program Files (x86)\eM Client\dbbackup.exe" -restore
Then in the pop-up you can choose the location of the recent backup you have.

Thanks for the suggestions Gary.

I tried disabling Kaspersky but it had no effect and there was no instance of eM Client running in Task Manager.

How do I run the restore command?  Is it from Powershell?

Run it from a command prompt or Win + R. I don’t think it runs in a PowerShell for some reason.

OK, I tried the **C:\Program Files (x86)\eM Client\dbbackup.exe –restore **command as you suggested and then tried it again with Dbbackup.exe as that was the format of the file name in the eM Client folder.  I then got the follewing message:

‘Either -restore or -backup argument must be supplied’

It must have the -restore option.

Open a command prompt. Paste in “C:\Program Files (x86)\eM Client\dbbackup.exe” -restore including the " ".

You will get a pop-up asking which backup to use, or if the backup is not stored in the default location, you can choose which folder it is in.

Gary I found one problem - I ‘lost’ the quotes at the beginning of the command.  When I put it in the command ran but threw up a whole load of text in the form of an exception

I don’t know if this will work but here is a screen shot of the text:

What you can try is to manually extract the backup.

Rename C:\Users[username]\AppData\Roaming\eM Client\ to something else. Create a new C:\Users[username]\AppData\Roaming\eM Client\ folder and extract the backup file to the new eM Client directory.

I did that OK but eM Client still throws up the same ‘eM Client was not closed properly last time’ message.  Looking in the new Roaming\em Client folder all the files are there but the program still doesn’t run.

Did you previously change the location of the database in eM Client settings?

As I can’t actually access the program I need some help as to how to do that.  Sorry to be somewhat dim.

Open the registry editor. (Win + R then type regedit)

If you go to Computer\HKEY_CURRENT_USER\Software\eM Client, if the location of the database was changed it should be listed in the right-hand windows as DBLocation. If it was not changed, there will be no DBLocation key.

In this example the location was not changed, it is the default, so there is no DBLocation key.

No, I’ve just checked and there is no DBLocation key under Computer\HKEY_CURRENT_USER\Software\eM Client.  So the database location hasn’t been changed.

Can you delete C:\Users[username]\AppData\Roaming\eM Client\ and then try start eM Client?

I deleted C:\Users[username]\AppData\Roaming\eM Client\ and tried starting eM Client and, unfortunately, absolutely nothing happened!

Can you restart Windows, then download and install the latest version available at http://www.emclient.com/release-history

I’ve just tried starting eM Client a second time and this time I got the checking for corrupted database and inconsistent data message again.  Green ticks indicated no problem found (or maybe successfully corrected ?) but the program still dowesn’t open.

I have already installed the latest version earlier today before I posted my problem.  Will a Windows re-start and re-installation have any likely effect?  Also, will I need to run the restore command again that you described earlier?

I was thinking that when you start eM Client and nothing happens, that means there is another eM Client process running. In Windows Task Manager there is Apps, but also a second section called Background Processes. Often there is an eM Client process running there. Restarting Windows will clear that.

So restart Windows, then run eM Client. See if that works.