It sounds as though there is a problem with the DC socket on the mobo. Some of these are easy to change as they are connected by a mini harness. Others are trickier (ie, more expensive) as they are soldered in. The problem with the other laptop is unrelated, and I've never come across a virus that can have any effect on the charging circuitry.
How to get Windows 10 now: how to download and install Windows 10 even if GWX.exe is missing