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".

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".

"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'."

Mark's Legacy

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.

File Corruption

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.

Downloaded Files

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

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.

Anti-Malware

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.

Platform Dependencies

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.

Article C4697 - January 8, 2011 « »

Share this article with your friends:

Share this article on Facebook Tweet this article Email a link to this article
Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?

6 Comments
Gabe
January 11, 2011 9:05 AM

For what it's worth, anyone reading through Leo's post and looking for answers to their iTunes dilema, you'll want to go to Apple's support page, here:

http://support.apple.com/kb/TS1406

Just two days ago, a friend of mine asked me for help with this and it's apparently a bad enough issue that Apple needed to post a fix. Following the steps in that link fixed her problem.

HTH,

Gabe

AG Wright
January 11, 2011 11:22 AM

If I had this computer brought in to me for repair I would start by checking the drive for errors using the disk for that version and if nothing there I would check for a virus, or four, with a bootable AV disk.
I'm not saying that it couldn't be something else but those are the things that I've seen cause this type of error the most often.

Nils Torben
January 11, 2011 11:51 PM

I have had this error: when clicking on e.g. a .txt-file I got the message "This is not a valid win32 app." and it was a registry issue. I don't remember what I did but fixed it, it was a matter of missing or faulty file association. The file association of .exe file might have been changed. (The question on top).
I found this link http://www.dougknox.com/xp/file_assoc.htm for restoring some file associations.

Ma en Meng
January 12, 2011 3:54 AM

I used to face this very problem in the past but my trials yielded into my discovering that most of the times the culprit is; Platform Dependecy

Willia, Stott
January 15, 2011 3:13 AM

In windows security the taskmanager is grayed
out.

alcen
January 12, 2012 12:43 AM

hi i got the same problem but i dont know how to fix it. the " msiiok32.dll is not a valid win apllication" comes out but i dont know what is the application that cause the problem and how t fix it.

Comments on this entry are closed.

If you have a question, start by using the search box up at the top of the page - there's a very good chance that your question has already been answered on Ask Leo!.

If you don't find your answer, head out to http://askleo.com/ask to ask your question.