-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
First of all: thanks for sharing this well written library!
Situation
I've made an installer with WixSharp, in this installer i validate if the windows machine has the component "WCF-HTTP-Activation" activated. On some machines it's working, but in an azure Windows Server 2012 machine i'm having problems when i execute the code above.
See if you can help me!
Here's the code
internal static bool IsHTTActivation35Ativated()
{
try
{
DismApi.Initialize(DismLogLevel.LogErrors);
using (var session = DismApi.OpenOnlineSession())
{
var feature = DismApi.GetFeatureInfo(session, "WCF-HTTP-Activation");
if (feature == null)
return false;
if (feature.FeatureState != DismPackageFeatureState.Installed)
return false;
return true;
}
}
catch
{
return false;
}
finally
{
DismApi.Shutdown();
}
}
Here's the error messages
An attempt was made to load a program with an incorrect format.
StackTrace
at BecomexInstaller.InstallerConfig.PrerequisitesInstallerConfig.IsHTTActivation35Ativated() at Microsoft.Dism.DismUtilities.ThrowIfFail(Int32 hresult, DismSession session)
at Microsoft.Dism.DismSession.Reload()
at Microsoft.Dism.DismApi.OpenOnlineSession()
Project config
System where it's not working
System where it's working
Metadata
Metadata
Assignees
Labels
No labels