简体   繁体   English

VS.NET MSI安装程序屏幕自定义

[英]VS.NET MSI Installer Screen Customization

I've added two textbox screens to my MSI installer, and have a custom installer action that hooks back to the application I'm installing to save config settings to the app.config file. 我已经在MSI安装程序中添加了两个文本框屏幕,并且具有一个自定义安装程序操作,该操作可以挂接到我要安装的应用程序中,以将配置设置保存到app.config文件中。

My question is this: Other than the MSI property screens that allow you to add default text to the MSI custom textboxes, is there a way to have the MSI grab values to put into the text fields from a file or web service, or something? 我的问题是:除了允许您向MSI自定义文本框添加默认文本的MSI属性屏幕之外,还有没有办法让MSI抓取值从文件或Web服务或其他内容中放入文本字​​段? I don't really want these values hard coded into the MSI property screens, and have to recompile and redistribute to change them. 我真的不希望将这些值硬编码到MSI属性屏幕中,而必须重新编译和重新分发以更改它们。

I'd really like to just throw an XML, or CSV file in WITH the installer, and have it read them out of that file, but I haven't seen a way to do that. 我真的很想在安装程序中放入XML或CSV文件,并从安装文件中读取它们,但是我还没有找到一种方法。

Thank you. 谢谢。

通过使用本机代码(C)编写的自定义操作,只要执行MSI的用户有权执行安装程序,就可以在安装程序中执行任何操作(取决于该操作是UI阶段还是执行阶段)。 MSI-后者由系统服务运行)。

What I eneded up doing was using GetPrivateProfileString from importing "kernel32" dll, and sticking a custom written INI file next to the MSI. 我确定要做的是使用GetPrivateProfileString导入“ kernel32” dll,并将自定义的INI文件粘贴到MSI旁边。 The property screens I was trying to fill out were removed, and now I can deploy a custom INI file with settings on a per client basis, without having to recompile, and make tedious changes to the installer settings in the project. 我试图填写的属性屏幕已删除,现在我可以在每个客户端上部署带有设置的自定义INI文件,而无需重新编译,并且可以对项目中的安装程序设置进行繁琐的更改。 Email or contact me if you want me to post the code. 通过电子邮件或与我联系,如果您希望我发布代码。

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

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