Instalar msi con msiexec en un directorio específico


Quiero instalar un msi con msiexec en un directorio específico. Estoy usando:

msiexec /i "msi path" INSTALLDIR="C:\myfolder" /qb

No funciona con el "INSTALLDIR", porque el msi se instala en la ruta predeterminada y no en mi ruta específica.

Author: Nathan, 2012-01-12

10 answers

Use TARGETDIR en lugar de INSTALLDIR. Tenga en cuenta que las comillas de la propiedad TARGETDIR solo están alrededor de la ruta en el caso de espacios.

Msiexec / i" msi path " TARGETDIR = "C:\myfolder" / qb

 39
Author: Ciprian,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-09-23 18:14:55

InstallShield 12

INSTALLDIR representa el directorio principal de instalación del producto para una instalación normal basada en Windows Installer (o InstallScript MSI), como la configuración de inicio del usuario final.exe o tu .base de datos msi.

TARGETDIR representa el directorio de instalación de una instalación InstallScript o de una instalación administrativa basada en Windows Installer (cuando el usuario ejecuta Setup).exe o MsiExec.exe con el conmutador de línea de comandos / a).

En un InstallScript MSI proyecto, la variable InstallScript MSI_TARGETDIR almacena el destino de una instalación administrativa.

 13
Author: David Schwartz,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-10-24 00:11:50
msiexec /i "msi path" INSTALLDIR="C:\myfolder" /q

Solo esta variante funcionó bien.

 6
Author: Moscow Boy,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-08-07 12:15:10

En Realidad, ambos INSTALLPATH/TARGETDIR son correctos. Depende de cómo MSI procesa esto.

Creo un MSG usando wixToolSet. En el archivo WXS, hay un nodo "Directory", cuyo directorio raíz puede ser como el siguiente:

<Directory Id="**TARGETDIR**" Name="SourceDir">;

Como puedes ver: Id es lo que debes usar.

 3
Author: xiaoym,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-01-22 02:38:59

Esto debería funcionar:

msiexec /i "msi path" TARGETDIR="C:\myfolder" /qb
 2
Author: Shibiraj,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-05-19 07:44:57

Para mi msi, tuve que establecer DEFAULTPATHC="D:\myfolder" porque más adelante en el proceso de instalación, tanto INSTALLDIR como TARGETDIR se restablecieron para reflejar el valor en DEFAULTPATHC

 1
Author: p4ndepravity,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-10-10 21:51:41

En mi caso todos ellos no funcionaron y finalmente fue

msiexec /i "msinamebla.msi" INSTALLFOLDER="C:\test\" /qb

Revisé el registro.txt como descrito por ezzadeen y encontrado "INSTALLFOLDER" allí.

 1
Author: Colibri,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-12-14 12:17:56

Este también funcionó para mí

msiexec /i "msi path" INSTALLDIR="D:\myfolder" /q

Había probado otras dos iteraciones y ambas instaladas por defecto C:\Program Files

INSTALLDIR = "D:\myfolder" / q lo tiene instalado en la otra unidad.

 1
Author: ttoomm,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-08-07 12:15:51

Use INSTALLLOCATION. Cuando tenga problemas, utilice el registro /lv.txt para volcar registros detallados. Los registros le indicarían si hay un cambio de propiedad que anularía sus propias opciones. Si ya ha instalado el producto, una segunda ejecución podría simplemente actualizarlo sin cambiar la ubicación de instalación. Usted tendrá que desinstalar primero (utilice la opción /x).

 0
Author: ezzadeen,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-08-09 19:11:17

Si has usado Advanced Installer para construir tu .msi usted querrá usar APPDIR=

 0
Author: lcg1ant,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-08-02 00:17:01