6

安装 shield Premiere 2009:从命令行键入 setup.exe /s /v/qn 以静默方式安装基本 MSI。但是如果它在默认情况下选择“修改”之前安装过一次并且不用于替换文件。但我需要再次复制文件。默认情况下,如何在第二次静默安装时执行“修复”?

4

4 回答 4

2

First of all: it looks like we need some more details as to what you are trying to achieve. do you want to reinstall the product to fix any broken components, or do you want to install a new version of the product (potentially side-by-side with the previous setup).

William's answer looks correct, but there may be some issues with the quotes. The behavior you describes indicates that Windows Installer wasn't able to parse the command line. I haven't tested this but try:

Setup.exe /s /v"/f {11111111-1111-1111-1111-111111111111} /qn"

Some background info: setup.exe is an Installshield-provider setup launcher. Anything after /V in the command line is passed "as is" to the main Windows Installer exe file msiexec.exe (msiexec.exe command line parameter reference).

Please note that Windows Installer is unlike any prior deployment solution. Once you have installed an MSI, Windows Installer keeps a record of the installation's internal GUIDs. It is hence not possible to install multiple instances of the same product (unless you design the MSI for this).

Some msiexec.exe sample command lines:

Install:

  • msiexec.exe /i MySetup.msi /q

Uninstall:

  • msiexec.exe /x MySetup.msi /qn
  • msiexec.exe /x {11111111-1111-1111-1111-111111111111} /qn

Repair:

  • msiexec.exe /f MySetup.msi /qn
  • msiexec.exe /f {11111111-1111-1111-1111-111111111111} /qn

Admin Image (extract source files from MSI):

  • msiexec.exe /a MySetup.msi TARGETDIR="C:\ExtractSourcesHere"

Remove /qn from any of the above command-lines to run interactively instead of silently.

于 2009-06-30T01:40:02.320 回答
1

安装盾@2009

添加以下代码:

function OnMaintUIBefore() ... ... begin // 如果是静默模式,则设置为修复模式并继续 if (MODE = SILENTMODE) then nType = REPAIR; 转到 Dlg_SdFeatureTree;万一;

于 2009-10-13T10:39:23.243 回答
1

我刚刚找到了解决方案:对于基本 MSI,打开属性管理器视图并将属性 _IsMaintenance 设置为“重新安装”。

于 2011-08-10T07:52:47.287 回答
0
Setup.exe /s /v"/f {11111111-1111-1111-1111-111111111111}" /v"/qn"

其中“{11111111-1111-1111-1111-111111111111}”是您要修复的安装的 ProductCode GUID。

于 2009-06-24T15:22:58.660 回答