Exe program is not a valid Win 32 application

Hi All,

I am getting a error on a exe script which runs on other computers fine. The exe is not corrupted.  I have Windows 7 and a XP computer that I started getting  Exe is not a valid Win32 application error. What would cause this error?

Please help.

Who is Participating?
sarabandeConnect With a Mentor Commented:
the file needs to be built on the lowest OS I will be using
if the utility2.exe was built at win7 there is little chance that it runs at xp systems unless you were using a compiler and linker version where the redistributables also run at the xp systems.

if the exe was built with vs 2010 or higher, there is no chance to get it run on xp. with vs2008 or older it is possible but you need the appropriate redistributable package (download from MSDN) installed on all target systems.

My first thought is the file is located on a network share/mapped drive (E:).  I would first make sure the computer has the mapped drive and that it goes to the proper location.  Then check permissions.
Vicki05Author Commented:
Hi Pony10us,

The script runs of a flash drive. It works on other computers without any issues. It is 2 computers in question. I did read in another post that the file needs to be built on the lowest OS I will be using. I am going to try that.

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

If it runs on a flash drive the be sure it is being assigned the same drive letter on every machine.  

It will be interesting to hear your results.  It makes sense that the script needs to be written for the lowest OS.
Scott SilvaNetwork AdministratorCommented:
I had that problem on some XP machines a few years back and have this .reg file for fixing it... You could try it, (after a backup).
Windows Registry Editor Version 5.00

"Content Type"="application/x-msdownload"






@="\"%1\" %*"


@="\"%1\" %*"






[HKEY_CLASSES_ROOT\exefile\shellex\PropertySheetHandlers\ShimLayer Property Page]

Open in new window

Scott SilvaNetwork AdministratorCommented:
are both pc's 32 or 64 bit?
>>  It works on other computers without any issues.

What OSes are these and what processors do they have in them?
Vicki05Author Commented:
I have had issues with a Windows 7 32 bit and Windows XP computers. I have built it on a 64 bit windows 7 where the issue did not happen. In the starting the script was working fine on the 2 computers. All of a sudden it stopped working.

When using a vbs script, it works fine. But a vbs converted using exescript editor to exe stopped working. I have recreated it in Windows XP. I will test it and let you know.  

Thanks for all your help. I will also try the registry fix if this does not work for me.
I have built it on a 64 bit windows 7
did you use visual studio? if yes, which version?

All of a sudden it stopped working.
try to start the script from a command window. if an error occured you might see an error text then.

you also could look to event viewer (type eventvwr into start menu) whether Windows has logged the error to the system or the application log.

Vicki05Author Commented:
I used a program called EXE script editor to convert a vbs to exe. VBS works fine, EXE used to work but stopped working. I have created the file on a Windows XP system. I have emailed the script to be tested. I will keep you posted.

I will also check the error log. Thanks for the suggestion.
Scott SilvaConnect With a Mentor Network AdministratorCommented:
I'm sorry but my suggestion was for ALL exe's not working... I guess I missed that it was just ONE specific EXE that wasn't working... I would have to say that your system needs some sort of  runtime that XP has, but this particular system does not have...
Vicki05Author Commented:

I am still waiting for the script to be tested. I will keep you posted. Inhouse it works fine but I need to get it tested in the field.
Vicki05Author Commented:
The script works now. It seems that I needed to compile it on a 32 bit OS.

Thanks for all the suggestions.
Vicki05Author Commented:
Thanks for all the suggestions. All the help is always appreciated.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.