Cannot set registry insert for HKLM for 32-bit

2019-07-04 07:55发布

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.

0条回答
登录 后发表回答