Unless those who are creating malware have found a way around this as well, this should work.
Yes, that would work, as would not downloading random files, opening everything you download in an isolated VM first, only downloading open source software, examining the code of the downloaded file yourself before running it, and so on. There are a thousand ways to mitigate against virus attacks, but we both know that most users don't do any of these things, browse the internet with very little care or due diligence, and download and run all kinds of add ons, apps, extensions, software, etc., without a second though.
How many average internet users do you think have
ever right clicked -> properties on a file before?. And of the few who have, how many would know what they are looking for? We continue to see very basic security mistakes even in the crypto space with users who we assume are more technically competent than the average population.