本文介绍了检测安装程序(msi)软件包的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在使用Visual Studio安装程序项目来开发用于桌面应用程序的安装程序包.我正在使用自定义操作使用户能够提供一些用于配置已安装的应用程序的其他信息.我还希望支持无提示(无人值守)安装.在这种情况下,用户应提供包含必要信息的xml文件.由于我不想强迫用户将文件存储在预定义的位置,因此我需要在自定义操作中检索安装程序包的位置,并检查该文件夹是否包含xml文件.到目前为止,我无法找到一种方法来检索msi程序包的位置.任何想法将不胜感激

Uros

Hi
I am using the visual studio installer project to develop installer package for a desktop application. I am using custom actions to enable the user to provide some additional information used to configure the installed application. I also want to support silent (unattended) installations. In that case the user should provide the xml file holding the necessary info. Since I don''t want to force the user to store the file on the pre-defined location, I need to retrive the location of the installer package within my custom action and check if that folder contains the xml file. So far I was unable to find a way to retrive the location of the msi package. Any ideas would be appreciated

Uros

推荐答案


/sourcedir="[SOURCEDIR]\"

现在,您可以通过以下行访问自定义操作中的源目录:

Now the source dir in your custom action can be accessed by the following line:

Context.Parameters["sourcedir"]


这篇关于检测安装程序(msi)软件包的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 14:27