我可以在安装程序中生成一个值并将其写入 app.config 吗?

发布于 2024-08-28 16:14:08 字数 118 浏览 1 评论 0原文

我正在开发一个安装程序项目,在安装过程中我希望用户创建一个“root”帐户。我想让 root 密码成为 app.config 文件的一部分,最好是加密部分。这样的事可能吗?这个问题有已知的解决方案吗?

此致

I'm working on an installer project, during the install process I'd like the user to create a "root" account. I'd like to have the root password become a part of the app.config's file, preferably the encrypted section. Is such a thing possible? Are there any known solutions to this problem?

Best regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

她说她爱他 2024-09-04 16:14:08

是的,你可以。 App.Config只不过是一个XML文件。将 app.config 放置在安装过程中的适当位置后,只需在安装程序中创建一个操作(执行程序或脚本)即可使用适当的值更新 app.config。

自定义操作:
http://msdn.microsoft.com/en-us /library/aa368066(VS.85).aspx

使用自定义操作执行程序:
http://msdn.microsoft.com/en-us/library/aa368563。 ASPX

Yes, you can. The App.Config is nothing more than an XML file. After you place the app.config in the appropriate place in the installation process, just create an action (either execute a program or a script) in the installer which updates the app.config with the appropriate value.

Custom Actions:
http://msdn.microsoft.com/en-us/library/aa368066(VS.85).aspx

Executing a program with a custom action:
http://msdn.microsoft.com/en-us/library/aa368563.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文