In hindsight, all of them are poorly-designed under the hood. However, the best was probably Windows 7, and the worst probably Windows 95 or 98. Windows Vista, 8, and 10 are pretty bad, while XP was tolerable.
However, Windows (all versions) have terrible underlying security. UAC was a bandaid that they slapped onto a very serious problem. Unix-like systems (including Linux and OSX) are engineered to be far more secure. Windows and OSX are also annoyingly closed down and proprietary.