简体   繁体   English

XXX.exe 不是有效的 Win32 应用程序

[英]XXX.exe is not a valid Win32 application

Configuration: Windows server 2008 x64.配置:Windows 服务器 2008 x64。

Software is cross platform c++ 64bit.软件跨平台c++ 64bit。

The previous installer defaulted to asking the user to install to以前的安装程序默认要求用户安装到

c:\Program Files (x86)\company\version c:\Program Files (x86)\公司\版本

For the last release I changed the installer using a path override to install to对于上一个版本,我使用路径覆盖更改了安装程序以安装到

c:\Program Files\company\version c:\Program Files\公司\版本

The guys who does testing for us said that with the new install to c:\Program Files\ sub processes don't start.为我们做测试的人说,新安装到 c:\Program Files\ 子进程不会启动。 Override installing to c:\Program Files (x86)\xxx everything runs fine.覆盖安装到 c:\Program Files (x86)\xxx 一切正常。 Going to cmd.exe and running from C:\Program Files\xxx gives the "yyy.exe is not a valid Win32 application" error.转到 cmd.exe 并从 C:\Program Files\xxx 运行会出现“yyy.exe 不是有效的 Win32 应用程序”错误。 Again this is not an issue with c:\Program Files (x86).同样,这不是 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.它运行从不更新且从不重新启动的 Server 2008(和 visual studio express)的演示版本。

Is there something special about the "x86" tacked onto the Program Files?附加到程序文件的“x86”有什么特别之处吗?

NOTE:笔记:

This is NOT a problem on my dev machine which is also server 2008 x86_64.这在我的开发机器上不是问题,它也是服务器 2008 x86_64。

dumbin /headers clearly indicates these programs are 64bit. dumbin /headers 清楚地表明这些程序是 64 位的。

At this point there is no answer.此时没有答案。 Workaround is to just install to Program Files (x86) or elsewhere and be done with it.解决方法是只安装到 Program Files (x86) 或其他地方并完成它。 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".这可能是安装程序的问题,它可能是“quack.exe”的典型案例,但适用于“Program Files”。 There's good reason why I generally hate windows.我通常讨厌 windows 是有充分理由的。

The Program Files (x86) directory is where 32-bit programs are installed. Program Files (x86) 目录是安装 32 位程序的地方。 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).当 32 位应用程序运行时,%ProgramFiles% 环境变量设置为 C:\Program Files (x86)\(默认情况下;这实际上可能位于不同的驱动器上)。

Are you absolutely sure this program is being compiled as 64-bit?您绝对确定此程序被编译为 64 位吗?

Maybe the exe finds a dll in a 32-bit somehow in that particular configuration?也许 exe 在该特定配置中以某种方式在 32 位中找到了 dll? Eg when sb managed to mess up his 64-bits dir with 32-bit dlls.例如,当某人设法用 32 位 dll 弄乱他的 64 位目录时。

Remember that not loadlibraried dll's are also loaded on startup.请记住,不是加载库的 dll 也会在启动时加载。

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. vc9 (vs2008) 创建了一个清单,我们在 .net 2003 上编译时通常不会使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM