[C#][Tips] コンパネ制御

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ControlPanel
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        //#######################################################
        //# SAMPLE
        //#######################################################
        #region
        /*
        //「インターネットのプロパティ」を開く
        System.Diagnostics.Process.Start("control.exe", "inetcpl.cpl");

        //関連付けで開くには、次のようにする
        //System.Diagnostics.Process.Start("inetcpl.cpl");

        //2枚目以降のタブを開くには、次のようにインデックスを指定する
        //「インターネットのプロパティ」の「プライバシー」ページを開く
        System.Diagnostics.Process.Start("control.exe", "inetcpl.cpl,,2");

        //「キーボードのプロパティ」を開く
        System.Diagnostics.Process.Start("control.exe", "main.cpl @1");
        */
        #endregion

        //*******************************************************
        /// <summary>
        /// 「ディスクの管理」diskmgmt.msc
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        //*******************************************************
        private void btn_ディスクの管理_Click(object sender, EventArgs e)
        {
            //mmc.exe diskmgmt.msc
            System.Diagnostics.Process.Start("mmc.exe", "diskmgmt.msc");
        }

        //*******************************************************
        /// <summary>
        /// 「システムのプロパティ」sysdm.cpl
        /// sysdm.cpl	
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        //*******************************************************
        private void btn_システムのプロパティ_Click(object sender, EventArgs e)
        {

            System.Diagnostics.Process.Start("control.exe", "sysdm.cpl");

        }

        //*******************************************************
        /// <summary>
        /// 「コンピューターの管理」compmgmt.msc	
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        //*******************************************************
        private void btn_コンピュータの管理_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("mmc.exe", "compmgmt.msc");        // コンピュータの管理
        }

        //*******************************************************
        /// <summary>
        /// 「ユーザーとグループ」
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        //*******************************************************
        private void btn_ローカルユーザーとグループ_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("mmc.exe", "lusrmgr.msc");         // ローカルユーザーとグループ

        }

        //*******************************************************
        /// <summary>
        /// 「タスクバーとスタートメニュー」
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        //*******************************************************
        private void btn_タスクバーとスタートメニュー_Click(object sender, EventArgs e)
        {
            //■タスクバー
            System.Diagnostics.Process.Start("control.exe", "/name Microsoft.TaskbarAndStartmenu");                       

        /*
            //■[スタート]メニュー(Win10なし)
            System.Diagnostics.Process.Start("control.exe", "/name Microsoft.TaskbarAndStartmenu /page pageStartmenu");   
            System.Diagnostics.Process.Start("rundll32.exe", "shell32.dll, Options_RunDLL 3");

            //■ツールバー
            System.Diagnostics.Process.Start("rundll32.exe", "shell32.dll, Options_RunDLL 6");
        */

        }

        //*******************************************************
        /// <summary>
        /// 「ユーザーアカウント制御の設定」
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        //*******************************************************
        private void btn_ユーザーアカウント制御の設定_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("UserAccountControlSettings.exe");

        }

        //*******************************************************
        /// <summary>
        /// 電源オプション
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        //*******************************************************
        private void btn_電源オプション_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("control.exe", "powercfg.cpl");
        }

        //*******************************************************
        /// <summary>
        /// 「デスクトップアイコンの設定」
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        //*******************************************************
        private void btn_デスクトップアイコンの設定_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("rundll32.exe", "shell32.dll,Control_RunDLL desk.cpl,,0");
        }

        //*******************************************************
        /// <summary>
        /// 「スクリーンセーバーの設定」
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        //*******************************************************
        private void btn_スクリーンセーバーの設定_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("control.exe", "desk.cpl,,1");
        }

        //*******************************************************
        /// <summary>
        /// 「フォルダーオプション」
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        //*******************************************************
        private void btn_フォルダーオプション_Click(object sender, EventArgs e)
        {
            //control /name Microsoft.FolderOptions
            //■フォルダオプション
            //System.Diagnostics.Process.Start("control.exe", "/name Microsoft.FolderOptions");

            //■フォルダオプション:表示
            System.Diagnostics.Process.Start("rundll32.exe", "shell32.dll,Options_RunDLL 7");

        }

        private void btn_スタートメニュー_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("EXPLORER.EXE", @"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\");
        }

        private void btn_システムの保護_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("SystemPropertiesProtection.exe");
            
        }

        private void btn_リモート_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("SystemPropertiesRemote.exe");
        }
    }
}