Click here to Skip to main content
11,920,772 members (58,315 online)
Rate this:
Please Sign up or sign in to vote.
See more: installer Exceptions
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
richcb 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 10-Apr-13 16:55pm
I do have some suggestions (please see my answer), but don't see anything special in the name. :-)
Jalapeno Bob 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
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:[^].

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.


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

  Print Answers RSS
0 OriginalGriff 548
1 Dave Kreskowiak 245
2 phil.o 170
3 KrunalRohit 134
4 F-ES Sitecore 130
0 OriginalGriff 6,778
1 KrunalRohit 4,530
2 Sergey Alexandrovich Kryukov 3,203
3 George Jonsson 2,815
4 Suvendu Shekhar Giri 2,181

Advertise | Privacy | Mobile
Web01 | 2.8.151120.1 | Last Updated 10 Apr 2013
Copyright © CodeProject, 1999-2015
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