Tente anexar cada um com os comandos Chamar e Aguardar. O MSIEXEC geralmente sairá direto para o console, o que faz com que msiexecs adicionais falhem, já que algo já foi instalado:
"start /wait msiexec /i \server\directory\FlashFF.msi /qn /norestart"
Para as atualizações do registro, existem duas maneiras de fazer isso:
- Exporte as chaves do registro e, em seguida, chame-as no script em lote
- Use Reg Add, você pode chamar o sistema de ajuda com
reg add /?
para obter a sintaxe:
REGISTRO ADD nome da chave [/ v ValueName | / ve] [/ t tipo] [/ s separador] [/ d dados] [/ f]
KeyName [\Machine]FullKey Machine Name of remote machine - omitting defaults to the current machine. Only HKLM and HKU are available on remote machines. FullKey ROOTKEY\SubKey ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ] SubKey The full name of a registry key under the selected ROOTKEY.
/v The value name, under the selected Key, to add.
/ve adds an empty value name (Default) for the key.
/t RegKey data types [ REG_SZ | REG_MULTI_SZ | REG_EXPAND_SZ | REG_DWORD | REG_QWORD | REG_BINARY | REG_NONE ] If omitted, REG_SZ is assumed.
/s Specify one character that you use as the separator in your data string for REG_MULTI_SZ. If omitted, use "%bl0ck_qu0te%" as the separator.
/d The data to assign to the registry ValueName being added.
/f Force overwriting the existing registry entry without prompt.
Examples:
REG ADD \ABC\HKLM\Software\MyCo Adds a key HKLM\Software\MyCo on remote machine ABC
REG ADD HKLM\Software\MyCo /v Data /t REG_BINARY /d fe340ead Adds a value (name: Data, type: REG_BINARY, data: fe340ead)
REG ADD HKLM\Software\MyCo /v MRU /t REG_MULTI_SZ /d fax%bl0ck_qu0te%mail Adds a value (name: MRU, type: REG_MULTI_SZ, data: fax%bl0ck_qu0te%mail%bl0ck_qu0te%%bl0ck_qu0te%)
REG ADD HKLM\Software\MyCo /v Path /t REG_EXPAND_SZ /d ^%systemroot^% Adds a value (name: Path, type: REG_EXPAND_SZ, data: %systemroot%) Notice: Use the caret symbol ( ^ ) inside the expand string