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).
Open the miktex package manager in admin mode (should be available from start menu programs). Install all uninstalled packages in the category
\Miktex X.X executables (windows-x86). That should (hopefully) fix your problem.
This is also happened to me when I installed TexStudio and updated the Miktex. But the problem is fixed after I opened the MiKTex Package Manager (Admin) then installed manually
miktex-latex. Maybe your problem can be solved by the same ways too.