2

How can I know if I build a 32bit application or 64bit application?

I have created .exe with Pyinstaller and it works fine on my computer (Win7 Ultimate 64), when I try to run the same exe on Virtual Machine (Win7 Home Premium 64) I get: Error 193 not a valid Win32 application.

Python 2.7 32bit PyInstaller 2.1 (I think also 32)

So isn't this 32bit application that should work fine on 64 too?

grabhints
  • 680
  • 8
  • 23
  • 1
    To check whether an exe is 32 or 64 bits: see [here](http://superuser.com/questions/358434/how-to-check-if-a-binary-is-32-or-64-bit-on-windows) – fvu Oct 07 '15 at 11:46
  • Perhaps your file simply was corrupted during transfer to the vm ? Compare the original and the copy or open the copy in notepad or a hexviewer and search for signs of a valid exe. – Marged Oct 07 '15 at 11:53
  • It is 32 bit application, thank you for advice. I have compared them they are the same.. :( – grabhints Oct 07 '15 at 12:02
  • Perhaps it's linked with 64 bit DLLs – David Heffernan Oct 07 '15 at 14:58
  • That's what I first thought, I use mfc100.dll, msvcp100.dll and msvcr100.dll but I can not find version for 32,64. I think it's the same thing. @DavidHeffernan – grabhints Oct 07 '15 at 16:48
  • You say you compared the file before/after the transfer... how? I would install e.g. HashTab and check the MD5 before and after the transfer. It certainly sounds like corruption. – Jonathon Reinhart Oct 07 '15 at 17:22
  • I made this work with python 2.7.10 64bit, I changed nothing except python for 64bit... So I guess it was some kind of mismatch, thank you all. – grabhints Oct 12 '15 at 11:02

2 Answers2

3

uninstall using "python27\Scripts>pip uninstall pyinstall" and Reinstall "python27\Scripts>pip install pyinstall" worked for me.

Dinesh
  • 66
  • 4
2

Use pip to uninstall then reinstall pyinstaller. The first time I used pyinstaller it worked, since then it corrupted. Reinstalling fixed the issue.

IMPOS
  • 21
  • 2