Автоматически выбирать функции для автоматической установки MSI

6034
Michiel van Oosterhout

У меня есть InstallShield .exe, который «оборачивает» установщик MSI. Я могу передать аргументы установщику MSI следующим образом:

/v"..." 

Например, чтобы сделать автоматическую установку: p4inst64.exe /S /v"/qn". Установщик MSI установит 4 функции; но я хочу установить только 1.

Как я могу указать выбор функции для установщика MSI из командной строки?

2

2 ответа на вопрос

3
Stein Åsmul

Вы можете попробовать добавить ADDLOCAL в командную строку:

p4inst64.exe /s /v"/QN /L*V "C:\test.log" ADDLOCAL="FeatureName"" 

Я не проверял это, но он должен работать нормально, исключая любые проблемы с кавычками внутри родительских кавычек.

/L*V "C:\Test.log"= verbose logging /QN = run completely silently ADDLOCAL="FeatureName" = Install this feature locally  
Спасибо! Мне пришлось один раз запустить установщик с подробным ведением журнала, чтобы найти имена компонентов (в журнале установки также используется «ADDLOCAL»). Michiel van Oosterhout 9 лет назад 0
Большинство настроек позволяют выбирать функции как часть своего графического интерфейса. Либо перейти на экран «Пользовательские настройки», либо в качестве одного из обычных диалоговых окон в «следующей последовательности диалогов». Вы также можете открыть MSI в [Orca] (http://msdn.microsoft.com/en-us/library/aa370557 (v = vs.85) .aspx) или в другом [Инструменте установки] (http: // stackoverflow .com / вопросы / 1544292 / что установка продукт в использовании-InstallShield-Wix-накрест продвинутый-инсталлятор / 1546941 # 1546941). Stein Åsmul 9 лет назад 0
setup.exe / v "MY_PROPERTY = \" Значение свойства \ "" на случай, если вышеуказанное не работает. Символ \ является escape-символом для следующего ". Stein Åsmul 7 лет назад 0
2
Stein Åsmul

I am adding a new answer with some alternative information - this might be useful if the scope of the modifications you need are larger than just a feature. See the end of the answer for a description of "transforms".

First, here are some screen shots so it is clear how to get the feature names. Here is a screen shot showing how you can find the feature names using Orca: Orca

Here is a couple of screen shots combined to show you how to see the features by running the MSI file itself. Dialogs and dialog sequencing can be changed for each MSI, but overall the concept is similar. Find the "Custom" dialog or just run the setup clicking "Next" until the feature list appears. Some setups have no feature list at all in the GUI, and then you need Orca or you can read the log file which you did.

MSI dialogs

Other, commercial installation tools or a trial installation of these (can be easier to install than the full SDK which is required to get Orca) can also be used to view the contents of an MSI file.

Finally: another way to modify what is installed by an MSI, as well as making other changes is to use a transform - a database modification snippet, or transaction that is applied to the original database to make changes for installation. Check this answer for an overview and this stackoverflow answer.

Это здорово, спасибо! Michiel van Oosterhout 9 лет назад 0

Похожие вопросы