应用程序在win10的不同位置创建注册表 [英] Application creates registry at different location for win10

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

问题描述

你好,

在我们的c#应用程序中,我们使用Registry.LocalMachine创建了注册表,并且它创建了注册表(对于32位Pc)HKEY_LOCAL_MACHINE \ SOFTWARE \ VMS地点。它适用于XP / Win7。但是对于Win10,它在不同的位置创建了注册表

HKEY_USERS \S-1-5-21-1562210660-278341176-3609463930-1001 \Software \Classes \ VirtualStore \ MACHINE \ SOFTWARE \ Myrosoft \ VMS



如果有任何解决方案,请告知我们,以便我们的应用程序在HKEY_LOCAL_MACHINE \ SOFTWARE \ VMS创建注册表即使win10

我们也看到许多应用程序(如mozila)在HKEY_LOCAL_MACHINE \ SOFTWARE \\下创建注册表即使win10。



我尝试过:



为此,我们尝试了这两种解决方案

1我们设置了跟踪栏从不通过控制面板通知用户帐户和控制设置

2.使用注册表编辑器禁用UAC(RegEdit)

运行注册表编辑器(RegEdit)并导航到以下注册表项:

HKEY_LOCAL_MACHINE \Software \ Microsoft \ Windows \ CurrentVersion \策略\System

找到以下REG_DWORD值:

EnableLUA

将EnableLUA的值设置为0.

hello,
In our c# application, we have created registry by using "Registry.LocalMachine", And it created registry at (for 32 bit Pc) "HKEY_LOCAL_MACHINE\SOFTWARE\VMS" location. It works fine with XP/Win7. But for Win10, it creates the registry at different location
"HKEY_USERS\S-1-5-21-1562210660-278341176-3609463930-1001\Software\Classes\VirtualStore\MACHINE\SOFTWARE\Microsoft\VMS"

Please let me know, if any solution for this so our application create registry at"HKEY_LOCAL_MACHINE\SOFTWARE\VMS" even if with win10
Also we have seen many applications(like mozila) creates registry under HKEY_LOCAL_MACHINE\SOFTWARE\ even if win10.

What I have tried:

For this we have tried these 2 solutions
1 we have set track bar to never notify of "User account and control setting" from control panel
2. Disable UAC with Registry Editor (RegEdit)
Run Registry Editor (RegEdit) and navigate to the following registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
Locate the following REG_DWORD value:
EnableLUA
Set the value of EnableLUA to 0.

推荐答案

最简单的解决方案就是:不要使用注册表。

这比你想象的要好得多:使用注册表比使用注册表更受限制,随着时间的推移变得越来越受限制,并不容易。因此,现在可能无法正常工作,因为你已经注意到Win 7 / Win 10.这是有充分理由的:太多应用程序滥用它并导致损坏或极度臃肿。

使用配置文件,或将其存储在安全文件夹中,而不是使用注册表:我应该在哪里存储我的数据? [ ^ ]建议一些并显示访问它们的代码。
The simplest solution is this: don't use the Registry.
That's a much better idea than you think: use of the Registry is more restricted than it was, and becoming more restricted with time, not easier. So what works now, may not work in future, as you have noticed with Win 7 / Win 10. And that is for good reason: too many apps were misusing it and causing damage, or extreme bloat.
Instead of using the registry, use a configuration file, or store it in a "safe" folder: Where should I store my data?[^] suggests some and shows the code to access them.




你的问题不是与Windows XP / 7与8/10相关,但与32位与64位版本的Windows相关。如果在64位Windows上运行32位应用程序,则使用WoW64(Windows 64上的Windows)执行。 WoW64将您的注册表访问重定向到注册表的不同部分(对于某些系统文件夹的文件访问也是如此)。

一种方法是为相应的操作系统提供64位版本的应用程序。



问候,

Tim
Hi,
your problem is not related to Windows XP/7 vs. 8/10 but to 32-bit vs. 64-bit versions of windows. If you run a 32-bit application on a 64-bit windows, it is executed using WoW64 (Windows on Windows 64). WoW64 redirects your registry-access to a different part of the registry (same for file access to certain system folders).
One approach would be to provide a 64-bit version of your application for the according operating systems.

Regards,
Tim


这篇关于应用程序在win10的不同位置创建注册表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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