简体   繁体   English

部署项目:从注册表中读取设置变量

[英]Deployment project: Read a setup variable from registry

I have a setup project in VisualStudio 2005. 我在VisualStudio 2005中有一个安装项目。

User is invited to fill-in the server address that will be stored in a registry key. 邀请用户填写将存储在注册表项中的服务器地址。

Now, I would like that if the user reinstalls this project, that the old server name be proposed by default as value in the setup interface. 现在,我希望如果用户重新安装该项目,则默认情况下将旧服务器名称作为设置界面中的值建议。

Is is possible to keep the ancient registry key value, to propose it in a new setup? 是否可以保留古老的注册表项值,并在新设置中提出?

Yes. 是。 Just don't remove the key when you uninstall the program. 只是在卸载程序时不要删除密钥。 Which means don't save your key where the application settings thing saves ie create the key yourself. 这意味着不要将密钥保存在保存应用程序设置的地方,即自己创建密钥。 You'll also want to look into whether you want this key for all users or one for each user and the permissions that your choice affects. 您还需要调查是要对所有用户使用此密钥,还是对每个用户使用一个密钥,以及选择所影响的权限。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM