Email: Password:       Forgot Password 
    .netCodeSG
A Saarsha Group Online Community for dot net codes group like C#, Asp.NET, VB.NET, Sharepoint, JavaScript, JQuery, Ajax, SQL, WCF, WPF.
 
TECHNOLOGIES:
 

Programmatically Open cpl command

Article:
Viewed:  1824 
Posted On:  20/09/2014 23:20:02 
How we can open cpl command programmatically in c# ? 

Here in this article I am going to show how we can interact *.cpl command through c# programming.  To achieve this I added a reference of shell32.dll in my solution.

You can find this dll from below location:

C:/windows/system32/shell32.dll

Below is my coding:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Shell32;
 
namespace ShowControlPanel
{
    public partial class Form1 : Form
    {
        public Form1()
        {            
             InitializeComponent();
        }
 
        Shell objshell = new Shell();

        private void Form1_Load(object sender, EventArgs e)
        {
            listBox1.Items.Add("access.cpl");
            listBox1.Items.Add("accwiz.cpl");
            listBox1.Items.Add("hdwwiz.cpl");
            listBox1.Items.Add("appwiz.cpl");
            listBox1.Items.Add("fsquirt");
            listBox1.Items.Add("compmgmt.msc");
            listBox1.Items.Add("btcpl.cpl");
            listBox1.Items.Add("desk.cpl");
            listBox1.Items.Add("directx.cpl");           
            listBox1.Items.Add("inetcpl.cpl");
            listBox1.Items.Add("intl.cpl");
            listBox1.Items.Add("irprops.cpl");
            listBox1.Items.Add("ncpa.cpl");
        }
 
        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            objshell.ControlPanelItem(listBox1.SelectedItem.ToString());
        }
    }
}
 

Now Run Application.

1.png

Image 1.

Select appwiz.cpl. . . 

2.png

Image 2.

Now select ncpa.cpl . . . 

3.png

Image 3.

  Comment:
 
By Rahul Saxena  On  20/09/2014 23:40:27
Windows RUN CPL Command List 1. Accessibility Controls – access.cpl 2. Accessibility Wizard – accwiz 3. Add Hardware Wizard – hdwwiz.cpl 4. Add/Remove Programs – appwiz.cpl 5. Administrative Tools – control admintools 6. Automatic Updates – wuaucpl.cpl 7. Bluetooth Transfer Wizard – fsquirt 8. Calculator – calc 9. Certificate Manager – certmgr.msc 10. Character Map – charmap 11. Check Disk Utility – chkdsk 12. Clipboard Viewer – clipbrd 13. Command Prompt – cmd 14. Component Services – dcomcnfg 15. Computer Management – compmgmt.msc 16. Control Panel – control 17. Date and Time Properties – timedate.cpl 18. DDE Shares – ddeshare 19. Device Manager – devmgmt.msc 20. Direct X Troubleshooter – dxdiag 21. Disk Cleanup Utility – cleanmgr 22. Disk Defragment – dfrg.msc 23. Disk Management – diskmgmt.msc 24. Disk Partition Manager – diskpart 25. Display Properties – control desktop 26. Display Properties – desk.cpl 27. Dr. Watson System Troubleshooting Utility – drwtsn32 28. Driver Verifier Utility – verifier 29. Event Viewer – eventvwr.msc 30. Files and Settings Transfer Tool – migwiz 31. File Signature Verification Tool – sigverif 32. Findfast – findfast.cpl 33. Firefox – firefox 34. Folders Properties – control folders 35. Fonts – control fonts 36. Fonts Folder – fonts 37. Free Cell Card Game – freecell 38. Game Controllers – joy.cpl 39. Group Policy Editor (for xp professional) – gpedit.msc 40. Hearts Card Game – mshearts 41. Help and Support – helpctr 42. HyperTerminal – hypertrm 43. Iexpress Wizard – iexpress 44. Indexing Service – ciadv.msc 45. Internet Connection Wizard – icwconn1 46. Internet Explorer – iexplore 47. Internet Properties – inetcpl.cpl 48. Keyboard Properties – control keyboard 49. Local Security Settings – secpol.msc 50. Local Users and Groups – lusrmgr.msc 51. Logs You Out Of Windows – logoff 52. Malicious Software Removal Tool – mrt 53. Microsoft Chat – winchat 54. Microsoft Movie Maker – moviemk 55. Microsoft Paint – mspaint 56. Microsoft Syncronization Tool – mobsync 57. Minesweeper Game – winmine 58. Mouse Properties – control mouse 59. Mouse Properties – main.cpl 60. Netmeeting – conf 61. Network Connections – control netconnections 62. Network Connections – ncpa.cpl 63. Network Setup Wizard – netsetup.cpl 64. Notepad notepad 65. Object Packager – packager 66. ODBC Data Source Administrator – odbccp32.cpl 67. On Screen Keyboard – osk 68. Outlook Express – msimn 69. Paint – pbrush 70. Password Properties – password.cpl 71. Performance Monitor – perfmon.msc 72. Performance Monitor – perfmon 73. Phone and Modem Options – telephon.cpl 74. Phone Dialer – dialer 75. Pinball Game – pinball 76. Power Configuration – powercfg.cpl 77. Printers and Faxes – control printers 78. Printers Folder – printers 79. Regional Settings – intl.cpl 80. Registry Editor – regedit 81. Registry Editor – regedit32 82. Remote Access Phonebook – rasphone 83. Remote Desktop – mstsc 84. Removable Storage – ntmsmgr.msc 85. Removable Storage Operator Requests – ntmsoprq.msc 86. Resultant Set of Policy (for xp professional) – rsop.msc 87. Scanners and Cameras – sticpl.cpl 88. Scheduled Tasks – control schedtasks 89. Security Center – wscui.cpl 90. Services – services.msc 91. Shared Folders – fsmgmt.msc 92. Shuts Down Windows – shutdown 93. Sounds and Audio – mmsys.cpl 94. Spider Solitare Card Game – spider 95. SQL Client Configuration – cliconfg 96. System Configuration Editor – sysedit 97. System Configuration Utility – msconfig 98. System Information – msinfo32 99. System Properties – sysdm.cpl 100. Task Manager – taskmgr 101. TCP Tester – tcptest 102. Telnet Client – telnet 103. User Account Management – nusrmgr.cpl 104. Utility Manager – utilman 105. Windows Address Book – wab 106. Windows Address Book Import Utility – wabmig 107. Windows Explorer – explorer 108. Windows Firewall – firewall.cpl 109. Windows Magnifier – magnify 110. Windows Management Infrastructure – wmimgmt.msc 111. Windows Media Player – wmplayer 112. Windows Messenger – msmsgs 113. Windows System Security Tool – syskey 114. Windows Update Launches – wupdmgr 115. Windows Version – winver 116. Windows XP Tour Wizard – tourstart 117. Wordpad – write
         HOME   |   Submit Article   |   Contact Us   |   About Us   |   Terms & Condition   |   Advertise With us