Windows 10 兼容模式 |注册表项 [英] Windows 10 Compatibility Mode | Registry Key

查看:44
本文介绍了Windows 10 兼容模式 |注册表项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在打包一个应用程序以在兼容模式下运行.我很容易在 HKLM(适用于所有用户)或 HKCU(仅适用于登录用户)中找到了创建注册表项的位置.

I'm currently packaging an application to run in compatibility mode. I easily found the location where the registry keys are created in the HKLM (for all users) or HKCU (for only the logged on user).

问题是;我真的不知道这是否有问题,我可以在 HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers 中设置注册表项.我创建了一个 REG_SZ,密钥的名称是路径.

The problem is; which I really don't know if it's a problem, I can set the registry key in HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers. I create a REG_SZ with the name of the key being the path.

例如:C:\Program Files (x86)\MyApplicationDirectory\MyApp.exe

E.G.: C:\Program Files (x86)\MyApplicationDirectory\MyApp.exe

这个key的值为~WIN7RTM

The value of this key is ~WIN7RTM

问题是,当我安装应用程序并使用此路径创建注册表项时.我可以单击快捷方式属性并进入兼容性选项卡,并注意到它似乎没有设置为在 Windows 7 中以兼容模式运行.

The problem is this, when I install the application and I create a registry key with this path. I can click on the shortcut properties and go into the Compatibility Tab and noticed it does not appear it's set to run in Compatibility Mode in Windows 7.

我知道我创建了正确的注册表项,因为我最初通过兼容性选项卡创建了快捷方式,然后单击了更改所有用户的设置",然后将其设置为在 Windows 7 中运行.如果我在快捷方式中设置了兼容模式,我可以看到它被选中.(以黄色突出显示)

I know I created the correct registry key because I originally created the shortcut through the compatibility tab and clicked "Change Settings for All Users" and then set it to run in Windows 7 there. If I set compatibility mode within the shortcut, I can see it checked. (highlighted in yellow)

但是,如果我尝试通过注册表项设置兼容模式并进入 EXE 或快捷方式的属性,则不会选中该框.

But if I try to set compatibility mode via the registry key and I go into the properties of the EXE or shortcut, the box is not checked.

  1. 如果我设置了注册表项,我如何验证应用程序是否在兼容模式下运行?
  2. 还有其他方法可以设置注册表项并确保它在兼容模式下运行吗?

推荐答案

别介意各位.我凝视并比较了创建的注册表项.我没有在 ~ 和 WIN7RTM 之间添加空格.一旦我添加了一个空格,它就可以正常工作.

Never mind folks. I did a stare and compare on the registry keys that is created. I did not add a space between the ~ and WIN7RTM. Once I added a white space, it worked fine.

之前:~WIN7RTM(不正确)

Before: ~WIN7RTM (not correct)

之后:~WIN7RTM(正确)

After: ~ WIN7RTM (correct)

忽略它.

这篇关于Windows 10 兼容模式 |注册表项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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