[英]How do I store user given data in registry keys at install time from NSIS installer?
I have program which has some values which vary from computer to computer but are only set once at the initialization of the program. 我有一些程序,其值因计算机而异,但在程序初始化时仅设置一次。 (ie a machine id value).
(即机器ID值)。 The program is installed a NSIS compiled installer.
该程序安装了NSIS编译的安装程序。
Currently the values are set on first run time of the program application, however I wanted to tidy this up and set it in the installer instead. 当前,这些值是在程序应用程序的首次运行时设置的,但是我想整理一下并在安装程序中进行设置。
Is it possible to ask the user to enter the values into the installer and then safe these to register keys to be read from the application? 是否可以要求用户将值输入到安装程序中,然后安全地注册要从应用程序读取的密钥? What would be the best way to implement this?
实施此方法的最佳方法是什么?
(The nsis source forge seems to be down unfortunately) (不幸的是,nsis源伪造似乎下降了)
Thanks 谢谢
You can build dialogs using nsDialogs . 您可以使用nsDialogs构建对话框。 If SourceForge is down, have a look at the your local documentation
%PROGRAMFILES%\\NSIS\\Docs
and the examples %PROGRAMFILES%\\NSIS\\Examples
. 如果SourceForge关闭,请查看您的本地文档
%PROGRAMFILES%\\NSIS\\Docs
和示例%PROGRAMFILES%\\NSIS\\Examples
。
For registry operations, take a look at ReadRegStr / WriteRegStr or ReadRegDWORD / WriteRegDWORD for a start. 对于注册表操作, 请先阅读ReadRegStr / WriteRegStr或ReadRegDWORD / WriteRegDWORD 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.