Hello Dalai,
I just registered to inform you that I have exactly the same problem (same error number).
And I also have a solution but it requires to change the UpdateInstaller.au3 script.
The problem lies in how the function GetLastError( ) is applied.
GetLastError( ) retrieves the result of the last called API function.
But if you call an API function like Wow64DisableWow64FsRedirection via DllCall, the AutoIT Runtime probably calls some additional API functions before and after calling the desired function.
Therefore GetLastError does not retrieve the result of Wow64DisableWow64FsRedirection but the result of the last API function that the AutoIT Runtime called.
You can verify this if you check the boolean return value of Wow64DisableWow64FsRedirection.
Wow64DisableWow64FsRedirection succeeded (TRUE) but GetLastError( ) still returns an error value (203).
The only reliable way to check the result of the Wow64DisableWow64FsRedirection call is to check the boolean return value.
Using GetLastError( ) is not reliable.
You would have to change
- Code: Select all
DllCall("kernel32.dll", "bool", "Wow64DisableWow64FsRedirection", "ptr*", DllStructGetPtr($pRedirect))
If (@error <> 0) OR (_WinAPI_GetLastError() <> 0) Then
...
EndIf
to something like this:
- Code: Select all
Dim $aDllCallResult
$aDllCallResult = DllCall("kernel32.dll", "bool", "Wow64DisableWow64FsRedirection", "ptr", DllStructGetPtr($pRedirect, 1))
If (@error <> 0) OR ($aDllCallResult[0] = 0) Then
...
EndIf
Regards,
Bernd