The code for a virus can reside on many things, usually the hard drive, in memory, on any kind of removable storage, or network storage. The list seems endless to those looking for opportunities to compromise your machine.
They can also exist in the BIOS, I.E. the motherboard, although that its very very rare. where windows is installed is completely irrelevant as far as virus installs are concerned