Archive: Problems with Windows Installer


Problems with Windows Installer
  I'm new to NSIS and have run into a problem installing the Windows installer WindowsInstaller-KB893803-v2-x86 from my NSIS script.

I've tried a number of variations on the command line switches to install silently and suppress the reboot, but I always end up with with the final screen asking whether I want to reboot (with the skip reboot tick box unticked)

Here are some of the variations:

Execwait '"WindowsInstaller-KB893803-v2-x86.exe" /quiet /norestart' $0
Execwait 'WindowsInstaller-KB893803-v2-x86.exe /quiet /norestart' $0
Execwait 'WindowsInstaller-KB893803-v2-x86.exe /q /z' $0


Thanks for any help


I assume the correct command is:


ExecWait '"WindowsInstaller-KB893803-v2-x86.exe" /quiet /norestart' $0 

>
Did you checked the result in $0?
Is it ERROR_SUCCESS or ERROR_SUCCESS_REBOOT_REQUIRED ??

Try:
Execwait 'WindowsInstaller-KB893803-v2-x86.exe /passive /norestart' $0


Thanks for the replies.

T.Slappy : It does return ERROR_SUCCESS_REBOOT_REQUIRED but the WindowsInstaller is displaying the reboot screen (ie it ignores the /quiet switch)

jpderuiter: I just tried that an it still asks if I want to reboot. It seems to ignore the request for a quiet/passive install.

Is there a way to tick the 'do not reboot' box in 'WindowsInstaller-KB893803-v2-x86.exe?


I do this, and there is no window asking for a reboot. No WindowsInstaller UI appears at all for either of the two files shown here.

        # WindowsInstaller 3.1, VisualC redistributable components
ClearErrors
ReadRegStr $R0 HKLM "${UNINSTALL_KEY}\{9A25302D-30C0-39D9-BD6F-21E6EC160475}" "DisplayVersion"
${If} ${Errors}
DetailPrint "Extract: VCRedist_x86.exe"
SetDetailsPrint none
SetOutPath $PLUGINSDIR
File "${SCC_LIB}\WindowsInstaller-KB893803-v2-x86.exe"
File "${SCC_LIB}\vc_red.msi"
File "${SCC_LIB}\vc_red.cab"

SetDetailsPrint both
DetailPrint "Execute: WindowsInstaller-KB893803-v2-x86.exe"
SetDetailsPrint none
ExecWait '"$PLUGINSDIR\WindowsInstaller-KB893803-v2-x86.exe" /quiet /norestart'

SetDetailsPrint both
DetailPrint "Execute: VCRedist_x86.exe"
SetDetailsPrint none
ExecWait '"$SYSDIR\msiexec.exe" /i $PLUGINSDIR\vc_red.msi /qn /norestart'
${EndIf}

demiller9:
Thanks very much for the code, that fixed my problem.

The bit that made it work was that WindowsInstaller... needed to be included in the NSIS installer package and ruinning it from $PLUGINSDIR, otherwise the /quiet switch didn't work