Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ExePayloadRef for PrimaryPayloadId and SecondaryPayloadId #532

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

drolevar
Copy link
Contributor

@drolevar drolevar commented Jun 20, 2024

I believe this fixes an issue with the custom BootstrapperApplication Id. This property can be anything, for example, "MyBootstrapper", but it's later assigned to PrimaryPayloadId, which is matched against Payload Id here:

    // Find the primary and secondary bootstrapper application payloads.
    for (DWORD i = 0; i < pUserExperience->payloads.cPayloads; ++i)
    {
        BURN_PAYLOAD* pPayload = pUserExperience->payloads.rgPayloads + i;

        if (!pUserExperience->pPrimaryExePayload && CSTR_EQUAL == ::CompareStringOrdinal(pPayload->sczKey, -1, sczPrimaryId, -1, FALSE))
        {
            pUserExperience->pPrimaryExePayload = pPayload;
        }
        else if (fFoundSecondary && !pUserExperience->pSecondaryExePayload && CSTR_EQUAL == ::CompareStringOrdinal(pPayload->sczKey, -1, sczSecondaryId, -1, FALSE))
        {
            pUserExperience->pSecondaryExePayload = pPayload;
        }
    }

While ExePayloadRef is exactly the reference to the exe payload.

@drolevar
Copy link
Contributor Author

@robmen Please, tell if more stuff has to be done, like unit tests, etc.

@robmen
Copy link
Member

robmen commented Jul 15, 2024

Yeah, need the following:

  1. Reference an open issue, it'll need to be approved by triage
  2. Add a test (unit or integration, whichever is most appropriate... this one should be a unit test) - especially for an issue like this which is a very subtle change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants