Make sure your operating system is totally up to date, including parts you may not use such as Internet Explorer, and in your case you should be at Windows 8.1 not 8.
A good security suite is better protection than an antivirus alone but nothing is 100% guaranteed.
As you don't name the malware, before trying to install McAfee I suggest you try a few tools to get rid of the infection.
Try AdwCleaner and MalwareBytes Free both linked HERE and if they don't help see the "Farbar" links near the bottom of that page. (Scroll down).
The alternative is to use a professional virus removal service and that costs money.
Also make sure you completely removed your prior Security software,to include using the products own personal removal tool. So it does not clash with McAfee.