【问题标题】:How to: access the path of the MSI file in the c# code?如何:在 c# 代码中访问 MSI 文件的路径?
【发布时间】:2013-06-17 21:24:14
【问题描述】:

实际上,在安装MSI 安装程序时,我还必须运行控制台应用程序,为此我需要安装MSI 安装程序的路径。

在某处编写使用 Windows 安装程序的 SourceDir 属性,为此它被提及如下:

您可以使用 Windows Installer 的 SourceDir 属性。

您可以在部署项目中将此信息作为 CustomAction 传递:/SrcDir="[SourceDir]\"

然后你可以在 c# 中使用它:this.Context.Parameters["SrcDir"]

但是我将在哪里设置 SourceDir 属性?

【问题讨论】:

    标签: asp.net windows-installer


    【解决方案1】:

    SourceDir 属性在您安装 msi 时由 Windows 安装程序自动设置。不应要求您手动设置属性。

    您是否尝试过阅读该属性?

    【讨论】:

      猜你喜欢
      • 2020-12-30
      • 2018-05-31
      • 1970-01-01
      • 1970-01-01
      • 2018-05-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-08
      相关资源
      最近更新 更多