将REINSTALLMODE传递给MSI文件 [英] Passing REINSTALLMODE to an MSI file

查看:314
本文介绍了将REINSTALLMODE传递给MSI文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VisualStudio2005和vdproj创建一个简单的MSI文件。当我启动它时,我需要传递REINSTALLMODE属性。

I am using VisualStudio2005 and a vdproj to create a simple MSI file. I need to pass in the REINSTALLMODE property when I launch it.

我知道这可以通过命令行完成,像这样:
msiexec.exe / i foo.msi REINSTALLMODE = amus

I know this can be done via command line, like so: msiexec.exe /i foo.msi REINSTALLMODE=amus

但是,如果用户选择直接单击msi(启动向导),则不会传递该属性。可以通过VS和vdproj这样做吗?

However, if a user chooses to click the msi directly (launching the wizard), the property is not passed. Is it possible to do this via the VS and vdproj?

我调查过的一些选项:


  • 当我通过VS构建MSI时,它也会产生一个setup.exe。有没有办法通过这种方式传递REINSTALLMODE属性?

  • 我安装了Orca,它允许我查看/编辑MSI的Property表。我可以这样添加,但是我每次做MSI构建时都必须添加它。

感谢任何

推荐答案

可惜的是,我找不到在VStudio中设置其他MSI属性的方法。

Sadly, I can't find a way to set other MSI properties right in VStudio.

尽管如此,一种应该工作的方法是这样的:

Nonetheless, one method that should work is this:


  1. 使用Orca创建转换(MST )只改变属性REINSTALLMODE。 (简而言之,您将属性&保存编辑为新变换,然后使用生成变换命令创建MST。)

  2. 此转换可以直接应用于您的MSI使用 MSITRAN.EXE 命令(可用)在同一个Windows Installer SDK中找到Orca)

  3. 您可以:
    (a)找到一种方法让Visual Studio在MSI后立即运行您的MSITRAN命令构建或
    (b)刚刚在测试之后手动(从批处理文件等)运行您的MSITRAN。

  1. Use Orca to create a transform (MST) that only change the property REINSTALLMODE. (In short, you edit the property & save as a new transform, then use the "Generate Transform" command to create the MST.)
  2. This transform can be applied directly to your MSI using the MSITRAN.EXE command (available in the same Windows Installer SDK where you found Orca).
  3. You could either: (a) find a way to have Visual Studio always run your MSITRAN command immediately after the MSI build, or (b) just run your MSITRAN manually (from a batch file or such) after building but before testing.

这篇关于将REINSTALLMODE传递给MSI文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆