
        ' Set up redirection of StdOut and StdErr
        secatt.nLength = LenB(secatt)
        secatt.lpSecurityDescriptor = 0&amp;
        secatt.bInheritHandle = APITRUE
        hOut = CreateFile( _
            sOutFile, GENERIC_READ Or GENERIC_WRITE, FILE_SHARE_READ, _
            secatt, OPEN_ALWAYS, _
            FILE_ATTRIBUTE_NORMAL Or FILE_FLAG_WRITE_THROUGH Or
             FILE_FLAG_SEQUENTIAL_SCAN, _
            0&amp;)
        If hOut = INVALID_HANDLE_VALUE Then
            DisplayError " creat