Example #1
0
        private static void SetPermissionsForAppId(string appId)
        {
            string subkey = "AppID\\" + appId;

            using (RegistryKey registryKey = Registry.ClassesRoot.CreateSubKey(subkey))
            {
                byte[] binaryDescriptor = OleConverterRegistry.GetBinaryDescriptor("O:BAG:BAD:(A;;CCDC;;;BA)(A;;CCDC;;;SY)(A;;CCDC;;;NS)(A;;CCDC;;;LS)(A;;CCDC;;;IU)");
                registryKey.SetValue("AccessPermission", binaryDescriptor);
                byte[] binaryDescriptor2 = OleConverterRegistry.GetBinaryDescriptor("O:BAG:BAD:(A;;CCDCSW;;;BA)(A;;CCDCSW;;;SY)(A;;CCDCSW;;;NS)(A;;CCDCSW;;;LS)(A;;CCDCSW;;;IU)");
                registryKey.SetValue("LaunchPermission", binaryDescriptor2);
            }
        }