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

Minor upgrade doesn't change files if EnableFeatureSelection="yes" in MsiPackage. #4616

Closed
wixbot opened this issue Dec 8, 2014 · 7 comments · Fixed by wixtoolset/wix#230
Assignees
Milestone

Comments

@wixbot
Copy link

wixbot commented Dec 8, 2014

Minor upgrade doesn't change files if EnableFeatureSelection="yes" in MsiPackage.
We use own boostrapper applicationand and control features via OnPlanMsiFeature callback.Files will upgrade only if feature isn't presented in previous setup and is presented in new setup. All other files keep untouched.
I think it's because of when applying minor update REINSTALL property is empty, but must be REINTALL=ALL or REINTALL=<feature to reinstall 1>, ...

Originally opened by sergju

@wixbot
Copy link
Author

wixbot commented Dec 11, 2014

When EnableFeatureSelection="yes" Burn calls back and you need to specify feature action states. If you're doing that, please reopen the bug and post the Burn log with details.

Release changed from v3.9 to v3.x
Resolution set to bydesign
Status changed from Untriaged to Resolved

@wixbot
Copy link
Author

wixbot commented Dec 12, 2014

Originally changed by sergju
Resolution changed from bydesign to
Statuschanged fromResolvedtoOpen

@wixbot
Copy link
Author

wixbot commented Dec 12, 2014

Please post your OnPlanMsiFeature code.

@wixbot
Copy link
Author

wixbot commented Dec 12, 2014

STDMETHODIMP_(int) OnPlanMsiFeature(__in_z LPCWSTR wzPackageId, __in_z LPCWSTR wzFeatureId, __inout BOOTSTRAPPER_FEATURE_STATE* pRequestedState)
{
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "OnPlanMsiFeature, wzPackageId='%ls', wzFeatureId='%ls'", wzPackageId, wzFeatureId);
HRESULT hr;

    BOOL bVal;

    if (SUCCEEDED(hr = EvalConditionVariable(wzFeatureId, bVal)))
    {
        (*pRequestedState) = bVal ? BOOTSTRAPPER_FEATURE_STATE_LOCAL : BOOTSTRAPPER_FEATURE_STATE_ABSENT;
    }

    BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "returned (*pRequestedState)=%d", (*pRequestedState));
    return IDNOACTION;
}

HRESULT EvalConditionVariable(LPCWSTR wzVariableName, BOOL& bVal)
{
    HRESULT hr;
    LPWSTR szCondition = NULL;

    if (S_OK != (hr = BalGetStringVariable(wzVariableName, &szCondition)))
        ExitWithLastError1(hr, "Variable %ls not found.", wzVariableName);


    if (SUCCEEDED(hr) && szCondition && *szCondition)
    {
        if (!SUCCEEDED(hr = m_pEngine->EvaluateCondition(szCondition, &bVal)))
            ExitWithLastError2(hr, "Enable to evaluate %ls=%ls condition.", wzVariableName, szCondition);
    }
LExit:
    ReleaseStr(szCondition);
    return hr;
}

And in burn log you can see feature state (_pRequestedState) at exit from method.
('returned (_pRequestedState)=3')

Originally posted by sergju

@wixbot wixbot added this to the v3.x milestone Dec 20, 2015
@yordans
Copy link

yordans commented May 13, 2019

Is this bug going to be fixed soon?

@robmen
Copy link
Member

robmen commented May 13, 2019

This issue is open and unassigned. That means it is waiting for someone to investigate the root problem, discuss possible solutions to that problem then implement the decided solution.

If you are interested in doing so yourself, our developer documentation provides a great checklist for getting started.

If you are not interested then you are waiting for someone else to become interested. If this issue has been open for a long time then there probably isn't much interest in this particular issue. In that case, you'll want to consider how to motivate others to fix it for you. This is a pretty good list of support options.

@rseanhall rseanhall self-assigned this Aug 22, 2022
@rseanhall rseanhall added this to To do in wix.4.0-preview.1 via automation Aug 22, 2022
@rseanhall rseanhall modified the milestones: v3.x, v4.0 Aug 22, 2022
wix.4.0-preview.1 automation moved this from To do to Done Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants