This bug seems to affect the MikTeX version of TeXWorks, but not the "official" one. I posted this bug report to the TeXWorks mailing list on May 9, but saw no response there.
When running a typesetting tool, TeXWorks constructs the HOME environment variable incorrectly. For example, before starting TeXWorks I have no HOME set, just HOMEDRIVE and HOMEPATH. (This is pretty standard in Windows 7; not sure about other versions).
When I start TeXWorks and create a fake typesetting tool that runs cmd.exe, I can type SET HOME in the console prompt, and I see this:
Notice the double backslash after C: in HOME. That's not a valid path on Windows, so my real typesetting tool (R running Sweave) fails when it can't find the user's home directory.