Windows 10 如何在关联菜单上为本地化MUI字符串添加下划线访问键?

Windows 10 如何在关联菜单上为本地化MUI字符串添加下划线访问键?,windows-10,registry,contextmenu,shell32.dll,Windows 10,Registry,Contextmenu,Shell32.dll,我正在添加以下注册表项,以便将关机选项添加到桌面上下文菜单: [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown] "Icon"="shell32.dll,-28" "MUIVerb"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,\ 6D,00,52,00,6F,00,6F,00,74,00,25,00,5C,00,73,00,79,00,73,00,74,00,65,00,\ 6D

我正在添加以下注册表项,以便将关机选项添加到桌面上下文菜单:

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown]
"Icon"="shell32.dll,-28"
"MUIVerb"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,\
  6D,00,52,00,6F,00,6F,00,74,00,25,00,5C,00,73,00,79,00,73,00,74,00,65,00,\
  6D,00,33,00,32,00,5C,00,73,00,68,00,65,00,6C,00,6C,00,33,00,32,00,2E,00,\
  64,00,6C,00,6C,00,2C,00,2D,00,33,00,33,00,32,00,38,00,30,00,00,00
"Position"="Bottom"
"SubCommands"=""

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\Shell\001ShutdownInstantly]
"MUIVerb"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,\
  6D,00,52,00,6F,00,6F,00,74,00,25,00,5C,00,73,00,79,00,73,00,74,00,65,00,\
  6D,00,33,00,32,00,5C,00,73,00,68,00,65,00,6C,00,6C,00,33,00,32,00,2E,00,\
  64,00,6C,00,6C,00,2C,00,2D,00,33,00,33,00,32,00,38,00,30,00,00,00
"Icon"="shell32.dll,-28"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\Shell\001ShutdownInstantly\command]
@="shutdown -sg -f -t 0"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\Shell\003RestartInstantly]
"MUIVerb"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,\
  6D,00,52,00,6F,00,6F,00,74,00,25,00,5C,00,73,00,79,00,73,00,74,00,65,00,\
  6D,00,33,00,32,00,5C,00,73,00,68,00,65,00,6C,00,6C,00,33,00,32,00,2E,00,\
  64,00,6C,00,6C,00,2C,00,2D,00,33,00,33,00,32,00,38,00,31,00,00,00
"Icon"="shell32.dll,-16739"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\Shell\003RestartInstantly\command]
@="shutdown -g -f -t 0"
由于我使用的是shell32.dll的本地化字符串(十六进制扩展为“@%SystemRoot%\system32\shell32.dll,-33280”),因此简单地放置一个符号(eihter“&”或“&”)不起作用,会破坏整个名称

顺便说一句,我有另一个代码片段,我已经修改为使用MUI,它自动使用下划线访问键,尽管我不知道为什么:

[HKEY_CLASSES_ROOT\Directory\shell\cmd2admin]
@=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,\
  6D,00,52,00,6F,00,6F,00,74,00,25,00,5C,00,73,00,79,00,73,00,74,00,65,00,\
  6D,00,33,00,32,00,5C,00,73,00,68,00,65,00,6C,00,6C,00,33,00,32,00,2E,00,\
  64,00,6C,00,6C,00,2C,00,2D,00,33,00,37,00,34,00,34,00,34,00,00,00
"Icon"="cmd.exe"
"Extended"=""

[HKEY_CLASSES_ROOT\Directory\shell\cmd2admin\command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\""