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

bootstrapper UpdateReplace with perUser InstallScope updates incorrectly #4943

Closed
wixbot opened this issue Nov 3, 2015 · 7 comments
Closed
Assignees
Milestone

Comments

@wixbot
Copy link

wixbot commented Nov 3, 2015

Hi

When performing an update using a custom bootstrapper I am hitting an odd scenario when the MSI is set to install perUser.

From my understanding of reading the logs when this works planning an UpdateReplace should:

  • Run the old bootstrapper as an Upgrade and be silent
  • Run the new bootstrapper as an Update

However, it appears to run the old bootstrapper as an Update instead. This gets it really confused - and the old version is not removed from Programs and Features correctly.

I have provided a sample with instructions here:
https://github.com/squirmy/wix-custom-ba-issue

Switching the InstallScope to perMachine will allow the sample to work correctly.

Originally opened by squirmy

@wixbot
Copy link
Author

wixbot commented Nov 6, 2015

Please post logs showing an attempted run.

Release changed from v3.10 to v3.x

@wixbot
Copy link
Author

wixbot commented Nov 6, 2015

I'm wondering if this is related to a bug I fixed in 4.x. If you are able to build Wix from source, take a look at src/burn/engine/EngineForApplication.cpp

Specifically the SetUpdate method.

            // Per-user bundles would fail to use the downloaded update bundle, as the existing install would already be cached 
        // at the registration id's location.  Here I am generating a random guid, but in the future it would be nice if the
        // feed would provide the ID of the update.
        if (!m_pEngineState->registration.fPerMachine)
        {
            rs = ::UuidCreate(&guid);
            hr = HRESULT_FROM_RPC(rs);
            ExitOnFailure(hr, "Failed to create bundle update guid.");

            if (!::StringFromGUID2(guid, wzGuid, countof(wzGuid)))
            {
                hr = E_OUTOFMEMORY;
                ExitOnRootFailure(hr, "Failed to convert bundle update guid into string.");
            }

            sczId = wzGuid;
        }
        else
        {
            sczId = m_pEngineState->registration.sczId;
        }

        hr = PseudoBundleInitialize(FILEMAKEVERSION(rmj, rmm, rup, 0), &m_pEngineState->update.package, FALSE, sczId, BOOTSTRAPPER_RELATION_UPDATE, BOOTSTRAPPER_PACKAGE_STATE_ABSENT, m_pEngineState->registration.sczExecutableName, sczLocalSource ? sczLocalSource : wzLocalSource, wzDownloadSource, qwSize, TRUE, sczCommandline, NULL, NULL, NULL, rgbHash, cbHash);

You should be able to just copy the entire method, to do local verification.

Originally posted by jchoover

@wixbot
Copy link
Author

wixbot commented Nov 20, 2015

Jacob, can you verify?

AssignedTo set to jchoover

@wixbot
Copy link
Author

wixbot commented Dec 2, 2015

Sorry for the late reply.

Logs available here:
https://github.com/squirmy/wix-custom-ba-issue/tree/master/logs

@jchoover - I haven't tried your fix but it seems like it may be on the right track.

Originally posted by squirmy

@wixbot
Copy link
Author

wixbot commented Dec 11, 2015

I can confirm after much fighting with my installed toolset, that the proposed changes do resolve this issue.

Next week I'll see what we can get this on the docket for 3.11.

Originally posted by jchoover

@wixbot
Copy link
Author

wixbot commented Dec 18, 2015

Release changed from v3.x to v3.11

@wixbot wixbot added this to the v3.11 milestone Dec 20, 2015
@jchoover
Copy link

wixtoolset/wix3#401

@barnson barnson closed this as completed Feb 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants