/// <summary>
        ///
        /// </summary>
        protected override void ProcessRecord()
        {
            switch (ParameterSetName)
            {
            case "ByVolume":
                WriteObject(RunKey.GetInstances(volume), true);
                break;

            case "ByPath":
                WriteObject(RunKey.Get(hivePath), true);
                break;
            }
        }
示例#2
0
 public static void RemoveStartupKey()
 {
     RunKey.DeleteValue(AppId, false);
 }
示例#3
0
 public static void AddStartupKey()
 {
     RunKey.SetValue(AppId, string.Format("\"{0}\"", Assembly.GetExecutingAssembly().Location));
 }