Inno setup Inno安装程序:日志注册表项创建
我可以通过启动Inno setup Inno安装程序:日志注册表项创建,inno-setup,Inno Setup,我可以通过启动Setup.exe/log=告诉Inno安装程序(使用最新版本5.5.9进行了尝试)创建日志文件 不幸的是,它似乎没有记录在[registry]部分中声明的注册表项的创建。如何告诉Inno安装程序也记录注册表项创建或未创建注册表项的原因?无法使Inno安装程序根据[registry]部分自动记录操作 但您可以使用和手动记录它们: 注册表写入错误(与任何错误一样)将自动记录: 2017-05-21 16:57:51.652 Before writing Test value 20
Setup.exe/log=
告诉Inno安装程序(使用最新版本5.5.9进行了尝试)创建日志文件
不幸的是,它似乎没有记录在
[registry]
部分中声明的注册表项的创建。如何告诉Inno安装程序也记录注册表项创建或未创建注册表项的原因?无法使Inno安装程序根据[registry]
部分自动记录操作
但您可以使用和手动记录它们:
注册表写入错误(与任何错误一样)将自动记录:
2017-05-21 16:57:51.652 Before writing Test value
2017-05-21 16:57:51.653 Message box (Abort/Retry/Ignore):
Error creating registry key:
HKEY_LOCAL_MACHINE\Software\My Company\My Program
RegCreateKeyEx failed; code 5.
Access is denied.
Click Retry to try again, Ignore to proceed anyway, or Abort to cancel installation.
2017-05-21 17:00:58.116 User chose Ignore.
2017-05-21 17:00:58.116 After writing Test value
如果需要更好地控制日志记录,则需要使用Pascal脚本(而不是
[Registry]
节项)来写入注册表。但是您不能使用方便的Inno安装注册表,因为它们不会给出失败的原因
您必须使用低级WinAPI函数
一些参考资料:
- 在Inno设置中使用低级注册表WinAPI函数:李>
- WinAPI错误的日志记录:
2017-05-21 16:57:51.652 Before writing Test value
2017-05-21 16:57:51.653 Message box (Abort/Retry/Ignore):
Error creating registry key:
HKEY_LOCAL_MACHINE\Software\My Company\My Program
RegCreateKeyEx failed; code 5.
Access is denied.
Click Retry to try again, Ignore to proceed anyway, or Abort to cancel installation.
2017-05-21 17:00:58.116 User chose Ignore.
2017-05-21 17:00:58.116 After writing Test value