I've done the same thing - taking ownership of the entire C:\Windows folder - and haven't had any issues since then.
I think the actual problem might be that you (intentionally or accidentally) changed permissions for the SYSTEM and TrustedInstaller "users" to access the contents of C:\Windows. (Remember ownership and permissions are separate things in Windows 7.)
I'm pretty sure that TrustedInstaller should have "full" access to everything whereas SYSTEM would have read/execute permissions only, but I'm not sure which files and folders this applies to exactly. (Obviously, SYSTEM would also need to have full access to some things in the Windows folder.)
So a "quick fix" would be to simply give full permissions to both of these entities, although this will unfortunately weaken security a little bit (meaning, any process running as SYSTEM gets full access, including malware or badly written apps).