After installing MiKTeX 2.9 on Windows 7, I can open TeXworks but only if I do not use the MiKTeX updater. After updating MiKTeX after installation and whenever I try to open TeXworks, I get the error message "... MiKTeX209-jpeg.dll is missing". I have reinstalled several times but have not been able to resolve the issue.
See bug at Miktex sourceforge:
Solutions are given by the bug opener in link.
If you just installed LyX and Miktex for the first time on your computer (as I did on a brand new computer), you can just Synchronize Miktex (to update packages list), then do an Update, this will fix the missing DLL issues.
Then you have to reconfigure LyX (LyX > Tools > Reconfigure) in order to refresh the document templates (else you will get a "missing article.cls" error).