ExecWait not waiting on 64 bit OS
I have an installer which detects whether IIS is installed (done via the registry) and will install it if required. If running Server 2008, I am using pkgmgr to install the relevant components.
A sub-section of my script is as follows:
Section "IIS" IIS
; detect if IIS is installed
Call IsIISInstalled
${If} $0 == ""
; install IIS
MessageBox MB_OK "IIS has not been detected on this system and will now be installed."
; detect operating system
GetVersion::WindowsName
Pop $R0
${If} $R0 == "Server 2008"
ExecWait "$WINDIR\system32\pkgmgr.exe /iu:IIS-WebServerRole" $1
.. etc
MessageBox MB_OK "ExecWait returned $1"
; now check to make sure that IIS was installed correctly before continuing
Call IsIISInstalled
${If} $0 == ""
; IIS install failed
MessageBox MB_OK "Could not install IIS. ${PRODUCT_NAME} requires IIS to function. Please install IIS manually and try again."
Abort "IIS installation failed, installation aborted"
${EndIf}
${Else}
${EndIf}
${Else}
${EndIf}
SectionEnd
The call to pkgmgr using ExecWait executes and waits till the package is installed on Server 2008 32 bit but on Server 2008 64 bit, ExecWait does not appear to wait and nothing gets installed.
On Server 2008 32 bit, ExecWait returned 0
On Server 2008 64 bit, ExecWait returned "" (nothing)