简体   繁体   English

如何在安装时通过NSIS安装程序将用户给定的数据存储在注册表项中?

[英]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 / WriteRegStrReadRegDWORD / WriteRegDWORD

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 创建安装程序:从注册表项(类似于wix / installshield / nsis)读取要安装到的路径 - Create an installer program: read a path to install to, from registry key (something like wix/installshield/nsis) 如果用户同意对话框,Wix安装程序如何创建注册表项? - Wix Installer how do I create registry key if the user agrees to a dialog? 您如何使用NSIS制作更新安装程序? - How do you make an update installer with NSIS? NSIS安装程序不会自动安装 - NSIS Installer wont install unattended Visual Studio安装程序:如何在注册表中删除项 - Visual Studio Installer : How to remove keys in the registry 从系统服务启动的NSIS安装程序中以登录用户身份启动应用程序 - Start application as logged user from NSIS installer launched by system service 如何从安装程序设置此注册表值 - How can I set this registry value from my installer 如何在NSIS安装程序脚本中捕获没有gotos / labels的YESNOCANCEL MessageBox的结果? - How do I capture the results of a YESNOCANCEL MessageBox without gotos/labels in NSIS installer scripting? 如何将“所有用户目录”设置为使用NSIS创建的安装程序的输出目录 - How to set the ALL USER Directory as an output directory for a installer created with NSIS 如何要求用户使用NSIS卸载以前的版本 - How do I require user to uninstall previous version with NSIS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM