System.Runtime.InteropServices.RegistrationServices.RegisterAssembly C# (CSharp) Method

RegisterAssembly() private method

private RegisterAssembly ( Assembly assembly, AssemblyRegistrationFlags flags ) : bool
assembly System.Reflection.Assembly
flags AssemblyRegistrationFlags
return bool
		public virtual bool RegisterAssembly (Assembly assembly, AssemblyRegistrationFlags flags)
		{
			throw new NotImplementedException ();
		}

Usage Example

コード例 #1
0
        public static void Install()
        {
            Assembly objAssembly = Assembly.GetExecutingAssembly();
            RegistrationServices objRegServices = new RegistrationServices();

            try
            {
                objRegServices.RegisterAssembly(objAssembly, AssemblyRegistrationFlags.SetCodeBase);

                RegistryKey objRK = Registry.CurrentUser.OpenSubKey(PATH_EXPLORER, true);
                objRK.SetValue("DesktopProcess", 1);
                objRK.Close();

                objRK = Registry.LocalMachine.OpenSubKey(PATH_APPROVED, true);
                objRK.SetValue(BuildHandler.CLSID, "RBuild");
                objRK.Close();

                objRK = Registry.ClassesRoot.CreateSubKey(PATH_RBUILD);
                objRK.SetValue(string.Empty, BuildHandler.CLSID);
                objRK.Close();
            }//try
            catch (Exception Ex)
            {
                Console.WriteLine(Ex.Message);
            }//catch
        }
All Usage Examples Of System.Runtime.InteropServices.RegistrationServices::RegisterAssembly