예제 #1
0
        public bool WriteValue(string Keyname, object value)
        {
            if (Regkey == null)
            {
                return(false);
            }

            try {
                Regkey.SetValue(Keyname, value);
                return(true);
            } catch {
                return(false);
            }
        }
예제 #2
0
        private bool TestRegistry()
        {
            try {
                Regkey.SetValue("TestKey", "1");
                string testKey = (string)Regkey.GetValue("TestKey");
                if (testKey != "1")
                {
                    return(false);
                }

                Regkey.DeleteSubKey("TestKey", false);
            } catch {
                return(false);
            }
            return(true);
        }