Helping people with computers... one answer at a time.
Windows performs a series of checks when it runs a program to ensure that it is indeed a program. If the checks fail it's not a valid application.
What is a valid Win32 Application? Every time I try to install a new program, I get an error message saying "this isn't a valid Win32 application". Is this problem with my AVG security program? How do I fix this so I can download simple things like a Flash Player? I've tried the "fix" websites, but my computer won't allow me to download the fix programs because they're not a valid Win32 Application!
Well, to be clear, you can download them just fine - you just can't run them after they're downloaded. The act of downloading just doesn't care if you're downloading a Win32 Application or anything else. It's only when the download completes and Windows tries to run what you just downloaded that the problem arises.
There are several possibilities, and I'll cover the most common ones I've seen.
I'll also explain, at a conceptual level, just what it means to be a "Valid Win32 Application".
As you might imagine a program file - say a .EXE, or a .DLL file - contains within it a fair amount of information. The instructions that comprise the program itself, the data associated with that program, the text that'll go in messages and so on.
One of the more important types of information that it contains is something that says "I'm an application, and I'm supposed to run on this kind of machine."
If that information is missing, incorrect, or doesn't match the machine you're trying to run it on, then the error that results might well be "not a valid Win32 Application".
As one example, it starts right at the very first two bytes. If you look at the contents of a .EXE file you'll find that the first two bytes - referred to as a "magic number" - are always 0x4D 0x5A - that's the hexadecimal representation for the upper case letters 'M' and 'Z'. That says "this is an executable file of some sort".
Why "MZ"? Well, it had to be something unique, and Mark Zbikowski simply elected to use his initials.
The very first check is a simple one: if a .EXE file (or a .DLL, or .SCR or several other executable formats) doesn't start with "MZ", then something's wrong. It's not a valid executable - simple as that.
There's more information that just Mark's initials. As the executable file format was extended in various ways additional information was added to further describe the program that the file contained. If that information isn't there, doesn't make sense, or isn't appropriate for the machine you're running on, then there's something wrong.
The most common cause is simple file corruption. Somehow, some way the information in the file has been overwritten or mangled or otherwise changed so that it no longer makes sense.
This can happen any number of ways, but it frequently results after a CRC or other disk error indicating that the disk media that the file is being read from is somehow damaged and unable to properly retain the information written to it. This is particularly true for magnetic media like old floppy disks, CDs or DVDs that have started to age, or flash drives that are starting to wear out.
Unfortunately the "cure" is typically to get and/or install a new copy of the program you're attempting to run.
Downloads can suffer "damage" that is similar to bad disks or media. While downloading if even a single bit it lost or received incorrectly in the download, or if the download is prematurely stopped or incomplete, it's very possible that the result will be detected as an invalid application.
Try the download again.
Malware's impact on this problem can take either of two forms:
As funny as it sounds, malware itself can end up being invalid applications. The files that comprise malware may specifically use misleading names and extensions, or can be encoded in some way to attempt to avoid detection. The malware may eventually decode the file or use it for something else, but in the mean time it's invalid. Malware is also frequently buggy, so it might well have been an attempt at an actual application gone wrong.
Of course some types of malware are designed specifically to wreak havoc or simply prevent certain programs - like your anti-malware tools - from running. One way to do that is to overwrite the contents of those other programs application files with garbage, resulting in an invalid application. Other techniques used by malware are also a common cause of this problem on previously working systems.
Make sure you're using up-to-date anti-malware tools, and scan regularly.
Ironically anti-malware tools themselves have been known to cause this error as well.
In an effort to scan files as they are copied to the machine - from any external source, disk or download - anti-malware tools have to read the file to scan its contents. It's not as common as it once was, but done improperly the act of reading can prevent other applications - including Windows itself - from accessing the file. If the timing is such that you try to run the program before the anti-malware scan is complete Windows can get confused and think it's an empty file and not a valid Win32 application.
Significantly less frequently anti-malware tools have been known to damage the very files they're scanning. This is pretty serious and as I said, extremely infrequent.
I've also heard cases of security setting and firewalls that block application downloads, but in such a way that the resulting files are zero length - definitely not a valid application.
Particularly with downloaded files, try turning off the "real time" protection offered by your anti-malware tools, and opt to perform a manual scan of the file before trying to run it.
An application written specifically for a 64-bit version of Windows will probably be considered an invalid Win32 application. Win32 indicates that the operating system is looking for 32-bit applications.
Applications that are incompatible with the current machine or "platform" fall into this bucket. Programs written for other operating systems that happen to use similar file names, or written for versions of Windows that are incompatible with the version you're running may result in the "not a valid application" error.
As you can see there are many, many possible reasons that an application might be detected as invalid. Some are real and valid warnings, others are problems caused by something else.
But all are simply Windows doing its best to try not to run something that it shouldn't.