在64位中创建注册表项 [英] Creating Registry key in 64bit

查看:87
本文介绍了在64位中创建注册表项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在Windows XP sp3 OS中创建了我的应用程序,运行时,我的应用程序将在注册表中查找DBKey,如果找不到,将创建该密钥.这可以在另一台装有Windows XP OS的计算机上使用.

1.如何确定计算机的操作系统以及32位或64位操作系统?

2.如何在64位操作系统中创建"DBKeys"注册表项?



全部in vb 2008

Hi,

I created my application using in a Windows XP sp3 OS, my application, when run, will seek DBKeys in the registry, if not found, will create that key. This worked in another computer with Windows XP OS.

1. How can i determine the Computer''s OS and if its a 32 or 64bit OS?

2. How can I create a "DBKeys" registry key in a 64bit OS?



All in vb 2008

Tnx in advance.

推荐答案

如果您的应用程序是AnyCPU编译的,它将在32位Windows和64位操作系统上作为32位应用程序运行64位Windows上的应用程序.通常,甚至不需要检查.

两者的过程和代码都相同.完全不需要进行任何更改,....

如果您的代码是经过编译的AnyCPU并在64位Windows上运行,并且您想在注册表的32位部分(在Wow6432Node下)中创建键/值,则必须稍作更改以处理这种情况.这就是你在做什么吗?
If your app is compiled AnyCPU, it''ll run as a 32-bit app on 32-bit Windows and as a 64-bit app on 64-bit Windows. Usually, there''s no need to even check.

The procedures and code will be identical on both. No need to make any changes at all, UNLESS....

If your code is compiled AnyCPU and running on 64-bit Windows, and you want to create keys/values in the 32-bit section of the registry (under Wow6432Node), then you have to change things a bit to handle that case. Would this be what you''re doing?


这篇关于在64位中创建注册表项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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