Archive: ExecWait not waiting on 64 bit OS


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)

Make sure that something is, in fact, being executed.

Keep in mind for example that on 64bit versions of Windows, System32 is transparently redirected to SysWoW64 ("Windows (32) on Windows 64" - confusing name? yes.).

If you need to ExecWait the 64bit version of pkgmgr, either refer to $WINDIR\SysNative\ (Vista+ and XP64 with some obscure by-request hotfix) or disable file system redirection (XP64).


Thanks for the suggestions. I will try these out.


Disabling file system redirection for that section worked. Thanks. :up:


coo - glad that was it :)