Instalaciones Silenciosas de .MSI y Ejecutables de Setup Factory en

trabajando,para activar un action plugin es necesario estando dentro del AMS ... Consulte el SDK de Windows ® Installer para obtener más documentación ... necesario tener instalado el AMS ”Autoplay Media Studio 7.x” y saber si el archivo ...
175KB taille 1 téléchargements 146 vues
Instalaciones Silenciosas de .MSI y Ejecutables de Setup Factory en AMS Instalar .MSI silenciosamente con el Plug RunSilent en AMS Buenas amigos para cargar un archivo de instalación .MSI de manera silenciosa con el Plugin RunSilent, lógicamente es necesario tener instalado el AMS “Autoplay Media Studio 7.x” y el plugin RunSilent, que lo podréis descargar desde: http://www.warmuskerken.com/plugins/Setup_RunSilent.exe Bueno una vez instalado el mencionado plugin,es necesario activarlo en el proyecto que estemos trabajando,para activar un action plugin es necesario estando dentro del AMS ”lógicamente”, hay varias maneras de activar un plugin: 1. Atraves de la Toolbar “barra de herramientas”, pulsado sobre el icono de Plugins:

2. Atraves de la Barra Superior pulsando sobre Project > Plugins...

Una ves as pulsado sobre Plugins te saldrá esta gestor de actions plugin donde tienes que buscar el dicho plugin RunSilent como se ve en esta imagen:

Bueno una vez seleccionado y activado es necesario dirigirse al objeto que deseas que gestione la instalación silenciosa por ejemplo un Botón, una vez abierto el botón dirigirse a la sección de Script/On Click y escribes lo siguiente: RunSilent.Exec("AutoPlay\\Docs\\tutorials setup 1.0.msi", "/passive");

los valores de RunSilent son los siguientes: Filename: La ubicación y el nombre del archivo a ejecutar. Parameters: Aquí van las lineas de parámetros. ResultVariable: Aquí es para establecer un valor de variable para ser usado luego (Opcional). Bueno con esto doy como finalizada la explicación de como instalar un .MSI silenciosamente con el Plug RunSilent en AMS, mas información en : http://aiodesings.wordpress.com/ Seguidamente os incluyo la lista de comandos valida para los instaladores .MSI:

Lista de Comandos .MSI Windows ® Installer. V 4.5.6002.18005 msiexec /opción [Parámetro opcional] Opciones de instalación Instala o configura un producto /a Instalación administrativa: instala un producto en la red /j [/t ] [/g ] Anuncia un producto: m para todos los usuarios, u para el usuario actual Desinstala el producto Opciones de pantalla /quiet Modo silencioso sin interacción del usuario /passive Modo desatendido: sólo se muestra la barra de progreso /q[n|b|r|f] Establece el nivel de interfaz del usuario n - sin UI b - UI básica r - UI reducida f - UI completa (predeterminado) /help Información de ayuda Opciones de reinicio /norestart No reiniciar una vez finalizada la instalación /promptrestart Pide al usuario que reinicie el equipo si fuera necesario /forcerestart Reiniciar siempre el equipo después de la instalación Opciones de registro /l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] i - mensajes de estado

w - avisos no graves e - todos los mensajes de error a - inicio de acciones r - registros específicos para la acción u - solicitudes del usuario c - parámetros iniciales de IU m - sin memoria o información de salida grave o - mensajes de espacio insuficiente en disco p - propiedades de Terminal Server v - información detallada x - información de depuración extra + - anexar al archivo de registro existente ! - vaciar cada línea al registro * - registrar toda la información, excepto las opciones vyx /log Equivalente a /l* Opciones de actualización /update [;Update2.msp] Aplica las actualizaciones /uninstall [;Update2.msp] /package Quita las actualizaciones de un producto Opciones de reparación /f[p|e|c|m|s|o|d|a|u|v] Repara un producto p - sólo si el archivo no existe o - si el archivo no existe o está instalada una versión anterior (predeterminado) e - si el archivo no existe o está instalada una versión anterior o igual d - si el archivo no existe o está instalada una versión diferente c - si el archivo no existe o la suma de comprobación no coincide con el valor calculado a - obliga a instalar todos los archivos u - todas las entradas de registro necesarias específicas del usuario (predeterminado) m - todas las entradas de registro necesarias específicas del equipo (predeterminado) s - todos los accesos directos especificados (predeterminado) v - se ejecuta desde el origen y copia en la caché el paquete local Establecer propiedades públicas [PROPERTY=Valor_propiedades] Consulte el SDK de Windows ® Installer para obtener más documentación acerca de la sintaxis de línea de comandos. Copyright © Microsoft Corporation. Reservados todos los derechos. Parte de este software está basado en el trabajo de Independent JPEG Group.

Instalar ejecutables de Setup Factory silenciosamente en AMS Buenas Amigos para cargar un ejecutable de setup factory silenciosamente en AMS lógicamente es necesario tener instalado el AMS ”Autoplay Media Studio 7.x” y saber si el archivo ejecutable a sido fabricado con SF “Setup factory 8.x”, y no solo eso... el archivo ejecutable echo por SF tiene que tener activa la opción de Enable silent/unattended install, si el instalador no es vuestro podréis saberlo solo con probar si funciona el comando “/S” si el instalador es vuestro solo tenéis que abrir el SF “Setup factory 8.x” y mirar en Proyect Settings > Advanced:

Bueno una ves sabido esto, solo tienes que entrar en el AMS y seleccionarrr el objeto que deseas que gestione la instalación silenciosa por ejemplo un Botón, una vez abierto el botón dirigirse a la sección de Script/On Click y escribes lo siguiente: File.Run("AutoPlay\\Docs\\MyProg.exe", "/S", "", SW_SHOWNORMAL, false);

los valores de File.Run son los siguientes:

Filename: La ubicación y el nombre del archivo a ejecutar. Args: Aquí van las lineas de parámetros. WorkingFolder: Aquí va el modo de pantalla que saldrá “Normal, Maximizado o Minimizado” WindowsMode: Aquí es para establecer un valor de variable para ser usado luego (opcional). WaitForReturn: Aquí es para hacer que espere para continuar o no “true o false” ResultVariable: Aquí es para establecer un valor de variable para ser usado luego (Opcional). Bueno con esto doy como finalizada la explicación de como instalar ejecutables de Setup Factory silenciosamente en AMS, mas información en : http://aiodesings.wordpress.com/ Seguidamente os incluyo la lista de comandos valida para los instaladores de Setup Factory:

Command Line Options Setup Factory's design time and run time support various command line options that can be passed, thus providing developers and network administrators more control over the install, uninstall and build process.

Tip: The global variable _CommandLineArgs can be used to determine what arguments were passed to the installation executable.

Install Command Line Options The following command line options are supported by the Setup Factory installer:

/S: Allow an install to be run in silent mode. As a result, no screens or dialogs will be shown. If /S is passed on the command line it will set the global variable _SilentInstall to true if the Enable silent/unattended install option is selected in project settings. This command line option also has an optional INI file that can be passed containing session variable values. For example: "C:\output\setup.exe" "/S:C:\setupvars.ini" This will cause the session variables in the INI file to be used for the setup. The INI file should be in the format: [SetupValues] %AppFolder%=C:\Program Files\Your Product 2 %UserName%=Joe Blow %Whatever%=Who knows

/T: Every setup executable requires some temporary space on the user's hard drive during the installation process. By default, Setup Factory uses the user's TEMP directory for extracting temporary files and other miscellaneous operations. You can force the setup executable to use an alternate directory by using the /T command line option. The syntax for the /T option is: /T: Replace "" with the path to the folder you want the setup executable to use for its temporary files. (Be sure to put quotes around the entire argument if the path includes any spaces.) If the folder doesn't already exist on the user's system, it will be created automatically. For example: "C:\Downloads\setup.exe" "/T:C:\My Temp Dir" (forces the installer to use "C:\My Temp Dir" for temporary files)

/NOINIT This command line option hides the "initializing..." dialog that appears when extracting dependency or primer files at the beginning of the install.

/W This command line option forces the Setup Factory launcher of a multi-segment install to wait for the setup executable to return before exiting. This is useful if you're running the installer from another process and you want that process to wait for Setup Factory to finish before proceeding. Note: This only applies to muti-segment setups since Web (Single File) setups always wait for return. Note: It is best not to use the /W option on very large multi-segment installs because errors may occur due to memory issues. If the /W command line option is not used, the setup return code will always be 0 since it is being returned after the launcher performs the initial extraction.

Uninstall Command Line Options The following command line options are supported by the Setup Factory uninstall program:

/S: Allow an uninstall to be run in silent mode. As a result, no screens or dialogs will be shown. If /S is passed on the command line it will set the global variable _SilentInstall to true if the Allow silent uninstall option is selected in uninstall settings. This command line option also has an optional INI file that can be passed containing session variable values. For example: Note: The /U command line option also must be used when calling the uninstall program. See /U for details. "C:\Windows\MyProduct\uninstall.exe" "/U:C:\Program Files\MyProduct\MyProduct.xml" "/S:C:\setupvars.ini" This will cause the session variables in the INI file to be used for the uninstall. The INI file should be in the format: [UninstallValues] %UserName%=Joe Blow %Whatever%=Who knows

/U: This command line option must be used when calling the uninstall program from the command line. This command also has an optional INI file that can be passed containing session variable values. For example: "C:\Windows\MyProduct\uninstall.exe" "/U:C:\Program Files\MyProduct\MyProduct.xml" This will cause the session variables in the INI file to be used for the uninstall. The INI file should be in the format: [UninstallValues] %UserName%=Joe Blow

%Whatever%=Who knows

Unattended Build Options The following command line options are supported by Setup Factory's design environment for an unattended build process: Note: The unattended build returns 0 as a process return code if successful, or non-zero if not. You can use this return code to make your batch files respond to the success or failure of the Setup Factory build process.

Unattended Build Return Codes The following unattended build errors may be returned. For a list of build errors, see Build Error Codes.

0 Build successful.

-3 Failed to find build configuration.

-4 Failed to open project file.

-5 Projects from previous versions of Setup Factory must be converted before use in the current version.

Command Line Options /BUILD Tells Setup Factory to build the project file passed in on the cmd line or from a batch file. For example: "C:\Program Files\Setup Factory 8.0\SUF80Design.exe" /BUILD "C:\TestProj.sf8" Tip: If you are running the build from a batch file, you can use "start /wait", for example: start "" /wait "C:\Program Files\Setup Factory 8.0\SUF80design.exe" /BUILD ...

/CONFIG: Specifies the build configuration to use in the build. If not specified, the first build configuration found in the project is used. For example: "C:\Program Files\Setup Factory 8.0\SUF80Design.exe" /BUILD "C:\TestProj.sf8"

"/CONFIG:DebugConfig"

/LOG: Specifies a log file to output build status to. If the file exists, the output will be appended to it. If the file does not exist, it will be created. For example: "C:\Program Files\Setup Factory 8.0\SUF80Design.exe" /BUILD "C:\TestProj.sf8" "/LOG:C:\output\Log.txt"

/STDOUT Makes the build status go to the standard output device. For example, if Setup Factory's build is run from another product that captures the standard output: "C:\Program Files\Setup Factory 8.0\SUF80Design.exe" /BUILD "C:\TestProj.sf8" "/STDOUT" Or, if you want to pipe the output to a new file: "C:\Program Files\Setup Factory 8.0\SUF80Design.exe" /BUILD "C:\TestProj.sf8" "/STDOUT" > "C:\build_output.txt" Or, if you want to append the output to an existing file: "C:\Program Files\Setup Factory 8.0\SUF80Design.exe" /BUILD "C:\TestProj.sf8" "/STDOUT" >> "C:\appended_build_output.txt"

/CONST: Lets you specify an INI file that contains design-time constants to override the ones in the project. You can define as many design-time constants as you want in the INI file, with each constant on a separate line beneath the [Constants] section. Each constant that is defined in the INI file must already be defined in the project file. For example: [Constants] #OUTPUTDIR#=C:\Output\Foobar 2009\Release #SETUPNAME#=foobar2008setup.exe #BUILD#=release When you use the /CONST option along with /BUILD, the specified project file is loaded into Setup Factory, the constants described in the specified unattended-build INI file are set, and the setup executable is generated-all without any interaction. For example: "C:\Program Files\Setup Factory 8.0\SUF80Design.exe" /BUILD "C:\TestProj.sf8" "/CONST:C:\MyProj\Config.ini"

Tutorial Creado por Ceone para: http://aiodesings.wordpress.com/