views:

1364

answers:

3

Configuration: Windows server 2008 x64.

Software is cross platform c++ 64bit.

The previous installer defaulted to asking the user to install to

c:\Program Files (x86)\company\version

For the last release I changed the installer using a path override to install to

c:\Program Files\company\version

The guys who does testing for us said that with the new install to c:\Program Files\ sub processes don't start. Override installing to c:\Program Files (x86)\xxx everything runs fine. Going to cmd.exe and running from C:\Program Files\xxx gives the "yyy.exe is not a valid Win32 application" error. Again this is not an issue with c:\Program Files (x86).

A customer also installed to default location and gets the same errors.

My build/dev machine does not show any of these errors. It runs a demo version of server 2008 (and visual studio express) that never updates and is never rebooted.

Is there something special about the "x86" tacked onto the Program Files ?

NOTE:

This is NOT a problem on my dev machine which is also server 2008 x86_64.

dumbin /headers clearly indicates these programs are 64bit.

At this point there is no answer. Workaround is to just install to Program Files (x86) or elsewhere and be done with it. Will put in an FAQ that users should NOT install to Program Files (they'll look at a faq if stuff goes nuclear).

This could be a problem with the installer, it could be a classic case of "quack.exe" but applied to "Program Files". There's good reason why I generally hate windows.

A: 

I think this is related to the manifest of the application. Have you changed this somehow? I got the same error when I was switching back and forth between compilers. vc9 (vs2008) created a manifest which we normally never use when we compile on .net 2003.

Magnus Skog
There is no manifest with this application.I'm using msvc9 (with express 2008), cygwin, jam, fltk, pcre, gdal and jpeg libraries all statically linked together.
Brian
I don't know about express, but with VS2008 Pro, you get an automatically generated manifest by default.
sean e
And to be precise, that manifest is embedded into the executable.
MSalters
+4  A: 

The Program Files (x86) directory is where 32-bit programs are installed. When a 32-bit application is running, the %ProgramFiles% environment variable is set to C:\Program Files (x86)\ (by default; this could actually be located on a different drive).

Are you absolutely sure this program is being compiled as 64-bit?

R. Bemrose
Absolutely 64bit. This is a high performance product processor for mass amounts of data and I can clearly watch each process run out all the ram and virtual memory.
Brian
Also I have to maintain two separate build environments. A couple of utilty applications are compiled and given to partners as 32bit. It is a serious pain to switch the build environment to 32bit from 64bit. 32bit aps are always labelled as *.x86_32.exe.
Brian
Hmm... judging from the default install path, the installer is 32-bit. Perhaps that's causing some problems? There are some other file system redirections (such as system32 being redirected to system64 for 32-bit apps) and registry redirections (HKEY_LOCAL_MACHINE\SOFTWARE\) going on.
R. Bemrose
Brian
dumpbin /summary clearly indicates the application is compiled 64bit.
Brian
+1  A: 

Maybe the exe finds a dll in a 32-bit somehow in that particular configuration? E.g. when sb managed to mess up his 64-bits dir with 32-bit dlls.

Remember that not loadlibraried dll's are also loaded on startup.

Marco van de Voort