Ejemplo n.º 1
0
        private void EnumRelatedFeatures(string productcode)
        {
            MsiError      ret;
            StringBuilder featureParent = new StringBuilder(64);
            StringBuilder feature       = new StringBuilder(64);
            uint          i             = 0;

            while ((ret = MsiInterop.MsiEnumFeatures(productcode, i, feature, featureParent)) == 0)
            {
                MsiInstallState installState = MsiInterop.MsiQueryFeatureState(productcode, feature.ToString());
                if (installState == MsiInstallState.Local)
                {
                    foreach (MsiFeature msiFeature in features)
                    {
                        if (msiFeature.Id == feature.ToString())
                        {
                            msiFeature.SetIsAlreadyInstalled(true);
                        }
                    }
                }
                i++;
            }
        }
Ejemplo n.º 2
0
 /// <summary>Blah</summary>
 public static uint ConfigureProduct(
     Guid ProductCode, MsiInstallLevel InstallLevel, MsiInstallState InstallState, string CommandLine)
 {
     return MsiConfigureProductEx("{" + ProductCode.ToString().ToUpper() + "}", (int)InstallLevel,
       (int)InstallState, CommandLine);
 }
Ejemplo n.º 3
0
        public static extern MsiError MsiSetFeatureState(Int32 install, string feature,
			MsiInstallState state);
Ejemplo n.º 4
0
        public static extern MsiError MsiSetComponentState(Int32 install, string component,
			MsiInstallState state);
Ejemplo n.º 5
0
        public static extern MsiError MsiInstallMissingComponent(string product,
			string component, MsiInstallState state);
Ejemplo n.º 6
0
        public static extern MsiError MsiGetFeatureState(Int32 install,
			string feature, out MsiInstallState state, out MsiInstallState action);
Ejemplo n.º 7
0
        public static extern MsiError MsiGetFeatureCost(Int32 install, string feature,
			MsiCostTree costTree, MsiInstallState state, out int cost);
Ejemplo n.º 8
0
        public static extern MsiError MsiGetComponentState(Int32 install,
			string component, out MsiInstallState state, out MsiInstallState action);
Ejemplo n.º 9
0
        public static extern MsiError MsiEnumComponentCosts(Int32 install,
			string component, uint index, MsiInstallState state, string drive,
			ref uint driveSize, out int cost, out int tempCost);
Ejemplo n.º 10
0
        public static extern MsiError MsiConfigureProductEx(string product,
			MsiInstallLevel level, MsiInstallState installState, string commandLine);
Ejemplo n.º 11
0
        public static extern MsiError MsiConfigureProduct(string product,
			MsiInstallLevel level, MsiInstallState installState);
Ejemplo n.º 12
0
        public static extern MsiError MsiConfigureFeature(string product,
			string feature, MsiInstallState installState);