HRESULT Execute(LPDWORD pReturnCode)
Here is where you write the code that performs the task. This method should return S_OK if there were no errors, and it can return another HRESULT if an error occurred while the task was running. Values other than S_OK that this method returns are matched up to <Error> elements in the <ExitCodes> section if you are using the preflight page.
The pReturnCode parameter must be updated with a number that reports the state of the task. These values are matched by the preflights page to <ExitCode> elements.