Can I configure KeePass to prompt for master key/password on Windows restore?

(I answer my own question):

I can find no way to configure KeePass itself to Prompt for master password when restored, so here is a workaround based on this superuser question:

Create and save a new Windows Scheduled Task:

  1. Start Task Scheduler: WinAdministrative Tools→Task Scheduler, or Win+R and enter taskschd.msc
  2. In Task Scheduler, Action→Create Task
  3. In Create Task's General tab, name the task Run KeePass at unlock
  4. In Create Task's Triggers tab, click New... then for Begin the task: select On workstation unlock and click OK
  5. In Create Task's Actions tab, click New... then in the Program/script field enter "C:\WINDOWS\System32\cmd.exe" and in the Add arguments (optional) field enter /c start "" <location of your KeePass database file> (the location of your KeePass database file appears in KeePass' main window title).
  6. Click OK in Create Task to save the task, then close the Task Scheduler window.

Now when you unlock your system, Task Scheduler will execute KeePass, which will gain focus and prompt you for your Master Password. If you have KeePass configured to Minimize main window after opening a database (under Options→Interface), your KeePass windows will also minimize after you have successfully entered your Master Password.