Solved

Exe program is not a valid Win 32 application

Posted on 2016-09-12
15
110 Views
Last Modified: 2016-09-28
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.

Thanks
Vicki
untitled2.bmp
0
Comment
Question by:Vicki05
  • 6
  • 3
  • 2
  • +3
15 Comments
 
LVL 26

Expert Comment

by:pony10us
ID: 41794989
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.
0
 

Author Comment

by:Vicki05
ID: 41795036
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.

Thanks,
Vicki
0
 
LVL 26

Expert Comment

by:pony10us
ID: 41795053
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.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 10

Expert Comment

by:Scott Silva
ID: 41795232
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).
WinXP_EXE_Fix.reg
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.exe]
@="exefile"
"Content Type"="application/x-msdownload"

[HKEY_CLASSES_ROOT\.exe\PersistentHandler]
@="{098f2470-bae0-11cd-b579-08002b30bfeb}"

[HKEY_CLASSES_ROOT\exefile]
@="Application"
"EditFlags"=hex:38,07,00,00
"TileInfo"="prop:FileDescription;Company;FileVersion"
"InfoTip"="prop:FileDescription;Company;FileVersion;Create;Size"

[HKEY_CLASSES_ROOT\exefile\DefaultIcon]
@="%1"

[HKEY_CLASSES_ROOT\exefile\shell]

[HKEY_CLASSES_ROOT\exefile\shell\open]
"EditFlags"=hex:00,00,00,00

[HKEY_CLASSES_ROOT\exefile\shell\open\command]
@="\"%1\" %*"

[HKEY_CLASSES_ROOT\exefile\shell\runas]

[HKEY_CLASSES_ROOT\exefile\shell\runas\command]
@="\"%1\" %*"

[HKEY_CLASSES_ROOT\exefile\shellex]

[HKEY_CLASSES_ROOT\exefile\shellex\DropHandler]
@="{86C86720-42A0-1069-A2E8-08002B30309D}"

[HKEY_CLASSES_ROOT\exefile\shellex\PropertySheetHandlers]

[HKEY_CLASSES_ROOT\exefile\shellex\PropertySheetHandlers\PEAnalyser]
@="{09A63660-16F9-11d0-B1DF-004F56001CA7}"

[HKEY_CLASSES_ROOT\exefile\shellex\PropertySheetHandlers\PifProps]
@="{86F19A00-42A0-1069-A2E9-08002B30309D}"

[HKEY_CLASSES_ROOT\exefile\shellex\PropertySheetHandlers\ShimLayer Property Page]
@="{513D916F-2A8E-4F51-AEAB-0CBC76FB1AF8}"

Open in new window

0
 
LVL 10

Expert Comment

by:Scott Silva
ID: 41795234
0
 
LVL 92

Expert Comment

by:nobus
ID: 41795456
are both pc's 32 or 64 bit?
0
 
LVL 48

Expert Comment

by:dbrunton
ID: 41795458
>>  It works on other computers without any issues.

What OSes are these and what processors do they have in them?
0
 
LVL 33

Accepted Solution

by:
sarabande earned 250 total points
ID: 41795783
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.

Sara
0
 

Author Comment

by:Vicki05
ID: 41795879
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.
0
 
LVL 33

Expert Comment

by:sarabande
ID: 41796043
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.

Sara
0
 

Author Comment

by:Vicki05
ID: 41796089
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.
0
 
LVL 10

Assisted Solution

by:Scott Silva
Scott Silva earned 250 total points
ID: 41797049
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...
0
 

Author Comment

by:Vicki05
ID: 41806567
Hi,

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

Author Comment

by:Vicki05
ID: 41819738
The script works now. It seems that I needed to compile it on a 32 bit OS.

Thanks for all the suggestions.
0
 

Author Closing Comment

by:Vicki05
ID: 41819749
Thanks for all the suggestions. All the help is always appreciated.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question