Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Exception installer W7
I have a program written in VB that installs and runs correctly on XP and W7/32, but behaves very strangely on W7/64. If I install it, the install goes cleanly but when I attempt to run it, it fails with a BadImageFormatException on one of it's DLLs. If I copy it from a flash drive into a directory on the W7/64 machine,it runs without error and produces correct results!
 
It is not the CPU type: this is set to x86 on all projects within the program.
 
It must have something to do with the install process.
 
Does anyone have any useful ideas?
Posted 10-Apr-13 11:16am
Comments
richcb at 10-Apr-13 16:25pm
   
I don't have any suggestions for your application issue, but I must say your screen name is the best I have seen.
Sergey Alexandrovich Kryukov at 10-Apr-13 16:55pm
   
I do have some suggestions (please see my answer), but don't see anything special in the name. :-)
—SA
Jalapeno Bob at 10-Apr-13 17:16pm
   
I thought of using a chili pepper for an avatar, but Chili's Grill and Bar might not be happy with that.....

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Please check up that all your modules are compiled to the target instruction-set architecture "AnyCPU" and you don't have any native (non-managed) modules. If you do have some, you would need to provide a mechanism for loading alternative implementations for different instruction-set architectures, such as x86-64 or Itanium (IE-64). This is how native modules of OS work: on a different version of OS, you have the same but API compiled to the instruction-set architecture used on this system.
 
Alternatively, you can use all modules in x86, which is supported via WoW64: http://en.wikipedia.org/wiki/WOW64[^].
 
In this case, you should make sure that you don't have a mixture of different instruction-set architectures in one process (different processes, naturally, can run in different platforms, WoW64 and the one native on the version of the OS. Again, make sure your native (non-managed) modules are consistent.
 
Generally, you need to have everything built to "AnyCPU", but, it working on WoW64 or any specific instruction-set architecture is important by some reason (which is always related to the unmanaged modules), and only the entry-point assembly should define a particular architecture.
 
—SA
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 375
1 Sergey Alexandrovich Kryukov 329
2 CPallini 260
3 DamithSL 214
4 Maciej Los 197
0 OriginalGriff 5,455
1 DamithSL 4,457
2 Maciej Los 3,885
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,115


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 10 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100