Pascal Scripting: ExecAndLogOutputWithNativeSysDir

Prototype:

function ExecAndLogOutputWithNativeSysDir(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer; const OnLog: TOnLog): Boolean;

Description:

Use this function instead of ExecAndLogOutput to launch an executable located in the 64-bit System directory from a 32-bit installer.

This function avoids the problem that ExecAndLogOutput in a 32-bit installer can only launch such an executable using the Sysnative alias, while that alias is not available to 64-bit applications. To achieve this, the function temporarily disables WOW64 file system redirection.

Remarks:

On 32-bit Windows or in a 64-bit installer, this function is just an alias for ExecAndLogOutput.