在Inno Setup中写入32/64位特定的注册表项 [英] Writing 32/64-bit specific registry key in Inno Setup
问题描述
我想要在安装程序时,安装程序将在以下位置创建注册表:SOFTWARE\Wow6432Node\Publisher\App
,在64位系统上的主要位置为{app}
.我想在"32位"位置对32位执行相同的操作,但我不知道它在哪里.安装程序将检查Windows版本并根据系统创建注册表.
您要写给:
-
在64位系统上:
SOFTWARE\Wow6432Node
-
在32位系统上:
SOFTWARE
为此,您不需要执行任何特殊操作. Windows注册表重定向器可以处理该问题.对于在64位系统上运行的32位应用程序,它会自动将SOFTWARE
重定向到SOFTWARE\Wow6432Node
. Inno Setup安装程序是32位应用程序.
因此,像下面这样的简单[Registry]
部分条目就可以完成您想要的操作.无需任何32位或64位特定代码:
[Registry]
Root: HKLM; Subkey: "SOFTWARE\My Company\My Program\Settings"; ...
当然,除非您使用 64位安装模式. /p>
另请参阅在Inno Setup安装结束时编写32/64位特定的注册表项.
>I want when I install program, the setup will create the registry in: SOFTWARE\Wow6432Node\Publisher\App
with {app}
main location on 64-bit systems. And I want do same for 32bit in "32 bit" location but i don't know where it is. The setup will check version of Windows and create registry depending on the system.
You want to write to:
on 64-bit systems:
SOFTWARE\Wow6432Node
on 32-bit systems:
SOFTWARE
For that, you do not need to do anything special. Windows registry redirector handles that. It automatically redirects SOFTWARE
to SOFTWARE\Wow6432Node
for 32-bit applications running on 64-bit systems. And Inno Setup installers are 32-bit applications.
So a simple [Registry]
section entry like below will do, what you want. No need for any 32-bit or 64-bit specific code:
[Registry]
Root: HKLM; Subkey: "SOFTWARE\My Company\My Program\Settings"; ...
Of course, unless you use 64-bit installation mode.
See also Writing 32/64-bit specific registry key at the end of the installation in Inno Setup.
这篇关于在Inno Setup中写入32/64位特定的注册表项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!