procedure entry point setdefaultdlldirectories could not be located kernel32.dll

Solution 1:

On Windows 7 you need to download and install update KB2533623 from this Microsoft link.

This update is described as:

Microsoft has released new API enhancements for Windows to help developers correctly and securely load external libraries. For more information, visit the following Microsoft webpages:

  • SetDefaultDllDirectories
  • AddDllDirectory
  • RemoveDllDirectory

Edit: The download has disappeared from the above link, but is still available from the
Microsoft Update Catalog : KB2533623.

Edit 2: Microsoft updated Windows 7 KB2533623 fix with some additional other security patches too. Because of that the KB number changed and old patch removed from server. New package name is KB4457144. The package can be found in Microsoft Update Catalog : KB4457144