Cannot set registry insert for HKLM for 32-bit

社会主义新天地 提交于 2020-01-15 01:18:38

问题


I want to create a context menu with sub menu items in Inno-setup. The problem is, is that it inserts HKLM keys in the 64-bit registry (WoW6432Node) section.

The documentation states that if the 64-bit architecture is not specified, the setup is running in 32-bit mode. Modes

[Registry]
Root: "HKCR"; Subkey: "folder\shell\TestMenu"; ValueType: string; Flags: UninsDeleteKey
Root: "HKCR"; Subkey: "folder\shell\TestMenu"; ValueType: string; ValueName: "MUIVerb"; ValueData: "test menu"; Flags: deletevalue UninsDeleteKey
Root: "HKCR"; Subkey: "folder\shell\TestMenu"; ValueType: string; ValueName: "SubCommands"; ValueData: "Testmenu.sub1;Testmenu.sub2"; Flags: deletevalue UninsDeleteKey
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Testmenu.sub1"; ValueType: string; Flags: UninsDeleteKey
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Testmenu.sub1"; ValueType: string; ValueData: "Sub menu 1"; Flags: deletevalue UninsDeleteKey
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Testmenu.sub1\command"; ValueType: string; ValueData: ""; Flags: deletevalue UninsDeleteKey
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Testmenu.sub2"; ValueType: string; Flags: UninsDeleteKey
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Testmenu.sub2"; ValueType: string; ValueData: "Sub menu 2"; Flags: deletevalue UninsDeleteKey
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Testmenu.sub2\command"; ValueType: string; ValueData: ""; Flags: deletevalue UninsDeleteKey

The HKCR is inserted correctly (although this does not has a 64 section). But the HKLM is inserted at:

"SOFTWARE\WoW6432Node\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Testmenu.sub2\command"

I also tried to prefix the Root to 'HKLM32' but that didn't work either. If I create the HKLM keys manually, the menu works.

Ho1 can I insert the HKLM keys to in the given path or force it to 32-bit.

来源:https://stackoverflow.com/questions/21426332/cannot-set-registry-insert-for-hklm-for-32-bit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!