Esempio n. 1
0
HRESULT ScaWebDirsUninstall(IMSAdminBase* piMetabase, SCA_WEBDIR* pswdList)
{
    Assert(piMetabase);

    HRESULT hr = S_OK;
    SCA_WEBDIR* pswd = pswdList;

    while (pswd)
    {
        if (WcaIsUninstalling(pswd->isInstalled, pswd->isAction))
        {
            // remove the application from this web directory
            if (pswd->fHasApplication)
            {
                hr = ScaDeleteApp(piMetabase, pswd->wzWebDirRoot);
                ExitOnFailure(hr, "Failed to remove application for WebDir");
            }

            hr = ScaDeleteMetabaseKey(piMetabase, pswd->wzWebDirRoot, L"");
            ExitOnFailure1(hr, "Failed to remove WebDir '%ls' from metabase", pswd->wzKey);
        }

        pswd = pswd->pswdNext;
    }

LExit:
    return hr;
}
Esempio n. 2
0
HRESULT ScaVirtualDirsUninstall(
    __in IMSAdminBase* piMetabase,
    __in SCA_VDIR* psvdList
    )
{
    Assert(piMetabase);

    HRESULT hr = S_OK;
    SCA_VDIR* psvd = psvdList;

    while (psvd)
    {
        if (WcaIsUninstalling(psvd->isInstalled, psvd->isAction))
        {
            // delete the application for this virtual directory
            if (psvd->fHasApplication)
            {
                hr = ScaDeleteApp(piMetabase, psvd->wzVDirRoot);
                ExitOnFailure(hr, "Failed to remove application for WebVDir");
            }

            if (0 != lstrlenW(psvd->wzVDirRoot))
            {
                hr = ScaDeleteMetabaseKey(piMetabase, psvd->wzVDirRoot, L"");
                ExitOnFailure1(hr, "Failed to remove VirtualDir '%ls' from metabase", psvd->wzKey);
            }
        }

        psvd = psvd->psvdNext;
    }

LExit:
    return hr;
}
Esempio n. 3
0
HRESULT ScaFiltersUninstall(IMSAdminBase* piMetabase, SCA_FILTER* psfList)
{
	HRESULT hr = S_OK;
	SCA_FILTER* psf = psfList;

	while (psf)
	{
		if (WcaIsUninstalling(psf->isInstalled, psf->isAction))
		{
			hr = ScaRemoveFilterFromLoadOrder(piMetabase, psf->wzFilterRoot, psf->wzKey);
			ExitOnFailure1(hr, "Failed to remove filter '%S' from load order", psf->wzKey);

			// remove the filter from the load order and remove the filter's key
			hr = ScaDeleteMetabaseKey(piMetabase, psf->wzFilterRoot, psf->wzKey);
			ExitOnFailure1(hr, "Failed to remove web '%S' from metabase", psf->wzKey);
		}

		psf = psf->psfNext;
	}

LExit:
	return hr;
}
Esempio n. 4
0
HRESULT ScaVirtualDirsUninstall(
	__in IMSAdminBase* piMetabase,
	__in SCA_VDIR* psvdList
	)
{
	Assert(piMetabase);

	HRESULT hr = S_OK;
	SCA_VDIR* psvd = psvdList;

	while (psvd)
	{
		if (WcaIsUninstalling(psvd->isInstalled, psvd->isAction))
		{
			hr = ScaDeleteMetabaseKey(piMetabase, psvd->wzVDirRoot, L"");
			ExitOnFailure1(hr, "Failed to remove VirtualDir '%S' from metabase", psvd->wzKey);
		}

		psvd = psvd->psvdNext;
	}

LExit:
	return hr;
}