I suspect your PDF viewer is Acrobat Reader, which has the unfortunate (ill-conceived, misbegotten) habit of putting a write lock on a file while displaying it. Option 1 is to switch to a different PDF viewer. (There are several good few ones for Windows.) Option 2 is to change your "viewer" to a script (batch file) that closes Reader and then reopens it. Some years back there was such a script that I think was included with at least one Windows port of LyX (Uwe's bundle?). You might be able to find it archived on the wiki.
Paul