环境变量来强制.NET应用程序作为32位运行 [英] Environment variable to force .NET applications to run as 32bit

查看:296
本文介绍了环境变量来强制.NET应用程序作为32位运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人告诉我有一个环境变量,你可以设置为强制.NET应用程序作为64位版本的Windows的32位应用程序的运行。你知道它是什么,或者知道它的参考?我怕我的谷歌福已经(或不存在)。没有我的今天。

I've been told there is an environment variable you can set to force .NET applications to run as 32bit applications on x64 versions of Windows. Do you know what it is, or know of a reference on it? I'm afraid my google-fu has failed me today (or it doesn't exist).

我使用的解析器一(一个.NET US preadsheet),并希望访问一些32位的唯一功能,而无需修改可执行文件。如果我可以从一个环境变量配置这个话,我可以在需要时访问32位功能,但作为一个64位应用程序,在需要的时候也跑。

I'm using Resolver One (a .NET spreadsheet) and want to access some 32bit only functionality without modifying the executable. If I can configure this from an environment variable then I can access 32bit functionality when needed but also run as a 64bit app when needed.

(注:有效地我希望能够切换应用程序是否为32位或64位在启动时运行,迫使它在编译时代替。)

(NOTE: effectively I want to be able to switch whether an application runs as 32bit or 64bit at launch time instead of forcing it at compile time.)

感谢

推荐答案

我已经从迪诺Veihland(微软IronPython的开发者)的回答。我还没有时间来测试它尚未...

I've had an answer from Dino Veihland (Microsoft IronPython developer). I haven't had time to test it yet...

这是COMPLUS_ENABLE_64BIT。我认为它设置为0禁用64位。

It's COMPLUS_ENABLE_64BIT. I think setting it to 0 disables 64-bit.

您应该能够将其作为的环境变量或添加值HKLM \软件\微软\ .NETFramework名为Enable_64Bit,类型REG_DWORD的值0到全局设置(这是怎么回事呢在COMPlus_ *瓦尔工作)。这一次可能是够特别(它在创建过程之前运行),它已经在的注册表项进行设置,但我不能完全肯定。

You should be able to set it as an env var or add a value to HKLM\Software\Microsoft\.NETFramework with the name "Enable_64Bit", the type REG_DWORD and the value 0 to set it globally (this is how all the COMPlus_* vars work). This one might be special enough (it has to run before the process is created) that it has to be set in the reg key but I'm not entirely certain.

这篇关于环境变量来强制.NET应用程序作为32位运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆