ถึงแม้ว่าปัจจุบันระบบปฏิบัติการ Windows จะมี GUI (Graphical User Interface) หรือส่วนต่อประสานกราฟิกกับผู้ใช้ ที่ช่วยให้เราสามารถใช้งานคอมพิวเตอร์ได้อย่างสะดวกมากยิ่งขึ้น แต่โปรแกรม Command Prompt ที่มีติด Windows มาตั้งแต่ยุคเริ่มต้นของคอมพิวเตอร์ ก็ยังเป็นโปรแกรมที่ถูกใช้งานมาจนถึงปัจจุบัน โดยเฉพาะการใช้เพื่อแก้ไขหรือสั่งการคอมพิวเตอร์ในแบบที่ GUI ไม่สามารถทำได้ ในบทความนี้ เรามาทำความรู้จัก และวิธีการใช้งาน Command Prompt เบื้องต้นกันดีกว่า
Command Prompt (cmd) คืออะไร
Command Prompt (cmd) คือโปรแกรมรูปแบบ Command-Line Interpreter หรือโปรแกรมรับคำสั่งภาษาสคริปต์เป็นข้อความเพื่อใช้สั่งการทำงานคอมพิวเตอร์โดยตรง แทนที่จะใช้กราฟิกโหมด (GUI) ของ Windows ซึ่งปกติมักจะนิยมใช้เพื่อตั้งระบบการทำงานอัตโนมัติในคอมพิวเตอร์ เช่น ต้องการสั่งให้คอมพิวเตอร์ปิดเองเวลากี่โมง เป็นต้น โดยใช้คำสั่ง (Script) ของโปรแกรม หรือ รันชุดคำสั่งที่ผู้ใช้เขียนไว้ใน Batch file (.bat)
วิธีการเปิด Command Prompt

สำหรับวิธีการเปิดใช้งานใน ระบบปฏิบัติการ Windows มีได้หลายวิธี แต่วิธีที่ง่ายที่สุดก็ คลิกที่ปุ่ม Windows Search แล้วพิมพ์คำสั่ง cmd เพียงเท่านี้ก็สามารถใช้งาน Command Prompt ได้แล้ว
รวมรายชื่อคำสั่ง Command Prompt
ฟังก์ชั่น | คำสั่ง Run |
---|---|
Add Hardware Wizard (ตัวช่วยเพิ่มฮาร์ดแวร์) | hdwwiz |
Adding a new Device (เพิ่มอุปกรณ์ใหม่) | devicepairingwizard |
Advanced User Accounts (ปรับแต่งสิทธิ์ผู้ใช้งาน) | azman.msc |
Advanced User Accounts (ปรับแต่งสิทธิ์ผู้ใช้งาน) | netplwiz |
Backup and Restore (สำรองข้อมูลและกู้คืน) | sdclt |
Calculator (เปิดเครื่องคิดเลข) | calc |
Certificates (เปิดตัวจัดการใบอนุญาต) | certmgr.msc |
Character Map (เปิดตัวจัดการอักขระ) | charmap |
ClearType Tuner (เปิดตัวปรับจูนตัวหนังสือ) | cttune |
Color Management (เปิดตัวจัดการแสดงผลสี) | colorcpl |
Command Prompt (เปิดหน้าต่าง Command Prompt) | cmd |
Component Services (เปิดตัวจัดการ Component Services) | comexp.msc |
Component Services (เปิดตัวแก้ไข Component Services) | dcomcnfg |
Computer Management (เปิดตัวจัดการคอมพิวเตอร์) | compmgmt.msc |
Computer Management (เปิดตัวจัดการคอมพิวเตอร์) | compmgmtlauncher |
Connect to a Projector (เชื่อมต่อโปรเจคเตอร์ จอภายนอก) | displayswitch |
Control Panel (เปิดหน้าต่าง Control Panel) | control |
Credential Backup and Restore Wizard (สำรองข้อมูลหนังสือรับรองและกู้คืน) | credwiz |
Data Execution Prevention (เปิดตัวจัดการลดความเสียหายของข้อมูล) | systempropertiesdataexecutionprevention |
Date and Time (เปิดหน้าตั้งค่า วันที่และเวลา) | timedate.cpl |
Device Manager (เปิดตัวจัดการอุปกรณ์) | hdwwiz.cpl |
Diagnostics Troubleshooting Wizard (เปิดตัวตรวจสอบปัญหาของระบบ) | msdt |
Digitizer Calibration Tool (เปิดตัวคาริเบ็ตเมาส์ปากกา) | tabcal |
DirectX Diagnostic Tool (เปิดตัวตรวจสอบ DirectX) | dxdiag |
Disk Cleanup (จัดการทำความสะอาดพื้นที่จัดเก็บ) | cleanmgr |
Disk Defragmenter (เรียงข้อมูลพื้นที่จัดเก็บ) | dfrgui |
Disk Management (ตัวจัดการดิสก์) | diskmgmt.msc |
Display (ตัวปรับความละเอียดย่อขยายจอ) | dpiscaling |
Display Color Calibration (ตัวปรับคาริเบ็ตสีหน้าจอ) | dccw |
DPAPI Key Migration Wizard (ตัวช่วยจัดการ DPAPI) | dpapimig |
Driver Verifier Manager (ตัวจัดการยืนยันไดร์เวอร์) | verifier |
Ease of Access Center (ตัวช่วยสำหรับการเข้าถึง) | utilman |
Event Viewer (เปิดดูประวัติ Log ของระบบ) | eventvwr.msc |
Fax Cover Page Editor (ตัวแก้ไขหน้าปก Fax) | fxscover |
Game Controllers (ตัวจัดการจอยคอนโทรลเลอร์) | joy.cpl |
Getting Started (เริ่มต้น) | irprops.cpl |
IExpress Wizard (เครื่องมือตัวช่วยติดตั้งแพ็คเกจ) | iexpress |
Internet Explorer (เปิดเว็บเบราว์เซอร์ Internet Explorer) | iexplore |
Internet Options (เปิดการตั้งค่าอินเทอร์เน็ต) | inetcpl.cpl |
Language Pack Installer (เปิดตัวติดตั้งแพ็คภาษา) | lpksetup |
Local Users and Groups (เปิดตัวจัดการ Users และ Groups) | lusrmgr.msc |
Magnifier (ตัวฟีเจอร์ขยายหน้าจอ) | magnify |
Malicious Software Removal Tool (เปิดเครื่องมือลบมัลแวร์) | mrt |
Math Input Panel (เปิดหน้าจอใส่คิดเลข คณิตศาสตร์) | mip |
Microsoft Management Console (เปิดตัวจัดการ Microsoft Management Console) | mmc |
Mouse (เปิดตัวตั้งค่าเม้าส์) | main.cpl |
NAP Client Configuration (เปิดตัวตั้งค่า NAP Client) | napclcfg.msc |
Narrator (เปิดตัวตั้งค่าปุ่มลัด Narrator) | narrator |
Network Connections (เปิดหน้าต่างเชื่อมต่อ Network) | ncpa.cpl |
New Scan Wizard (เปิดตัวช่วยสแกน) | wiaacmgr |
Notepad (เปิด Notepad จดบันทึก) | notepad |
ODBC Data Source Administrator | odbcad32 |
On-Screen Keyboard (เปิดคีย์บอร์ดบนหน้าจอ) | osk |
Open Documents Folder (เปิดโฟลเดอร์เอกสาร) | documents |
Open Downloads Folder (เปิดโฟลเดอร์ดาวน์โหลด) | downloads |
Open Favorites Folder (เปิดโฟลเดอร์ใช้งานประจำ) | favorites |
Open Pictures Folder (เปิดโฟลเดอร์รูปภาพ) | pictures |
Open Recent Folder (เปิดโฟลเดอร์ที่เพิ่งใช้ล่าสุด) | recent |
Open Videos folder (เปิดโฟลเดอร์วิดีโอ) | videos |
Paint (เปิดโปรแกรมวาดรูป Paint) | mspaint |
Pen and Touch (เปิดตัวตั้งค่าปากกาและสัมผัส) | tabletpc.cpl |
People Near Me (ค้นหาผู้คนรอบข้าง) | collab.cpl |
Performance Monitor (หน้าต่างแสดงประสิทธิภาพการทำงาน) | perfmon.msc |
Performance Options (ปรับแต่งประสิทธิภาพการทำงาน) | systempropertiesperformance |
Phone and Modem (เชื่อมต่อโทรศัพท์และโมเดม) | telephon.cpl |
Phone Dialer (ปุ่มกดโทรศัพท์) | dialer |
Power Options (ตัวเลือกจัดการพลังงาน) | powercfg.cpl |
Printer User Interface (หน้าคำสั่ง Printer) | printui |
Private Character Editor (ตัวแก้ไข สร้างฟอนต์ส่วนตัว) | eudcedit |
Problem Steps Recorder (บันทึกหน้าจอเป็นขั้นตอน) | psr |
Programs and Features (ตัวติดตั้งถอนโปรแกรม) | appwiz.cpl |
Region and Language (ตัวจัดการภูมิภาคและภาษา) | intl.cpl |
Registry Editor (ตัวแก้ไข Registry) | regedit |
Remote Access Phonebook (ควบคุมเข้าถึงสมุดโทรศัพท์) | rasphone |
Remote Desktop Connection (ควบคุมเครื่องระยะไกล) | mstsc |
Resource Monitor (หน้าต่างเช็คทรัพยากรเครื่อง) | resmon |
SAM Lock Tool (เครื่องมือล็อกรหัสเข้าฐานข้อมูล) | syskey |
Screen Resolution (จัดการความละเอียดหน้าจอ) | desk.cpl |
Services (หน้าต่างรายการ Services) | services.msc |
Set Program Access and Computer Defaults (ตั้งค่าการเข้าถึงโปรแกรมกลับไปเริ่มต้น) | computerdefaults |
Share Creation Wizard (แชร์ตัวช่วย Wizard) | shrpubw |
Shared Folder Wizard (แชร์โฟลเดอร์ Wizard) | shrpubw |
Shared Folders (เข้าถึงโฟลเดอร์แชร์) | fsmgmt.msc |
Snipping Tool (เครื่องมือบันทึกภาพหน้าจอ) | snippingtool |
Sound (ตัวจัดการตั้งค่าอุปกรณ์เสียง) | mmsys.cpl |
Sound recorder (ตัวบันทึกเสียง) | soundrecorder |
SQL Server Client Network Utility (เครื่องมือตั้งค่า SQL Server Client Network) | cliconfg |
Sticky Notes (จดโน้ต เปิดกระดาษโพสอิท) | stikynot |
Sync Center (ศูนย์ถ่ายโอนข้อมูล) | mobsync |
System Configuration (ตั้งค่าระบบ) | msconfig |
System Configuration Editor (ตัวแก้ไขการตั้งค่าระบบ) | sysedit |
System Information (เช็คข้อมูลระบบ) | msinfo32 |
System Properties (เช็คคุณสมบัติระบบ) | sysdm.cpl |
System Properties (Advanced Tab) (เช็คคุณสมบัติระบบ – แท็บ Advanced) | systempropertiesadvanced |
System Properties (Hardware Tab) (เช็คคุณสมบัติระบบ – แท็บ Hardware) | systempropertieshardware |
System Properties (Remote Tab) (เช็คคุณสมบัติระบบ – แท็บ Remote) | systempropertiesremote |
System Properties (System Protection Tab) (เช็คคุณสมบัติระบบ – แท็บ System Protection) | systempropertiesprotection |
System Restore (ตัวกู้คืนระบบ) | rstrui |
Task Manager (หน้าต่างตรวจสอบการทำงาน) | taskmgr |
Task Scheduler (จัดการตั้งค่า การทำงานล่วงหน้า) | taskschd.msc |
Taskbar and Start Menu (เปิด Taskbar และ Starte Menu) | control.exe /name Microsoft.TaskbarandStartMenu |
Troubleshooting (ตรวจสอบปัญหา) | control.exe /name Microsoft.Troubleshooting |
Trusted Platform Module (TPM) Management (ตัวจัดการความเชื่อถือ) | tpm.msc |
User Account Control Settings (จัดการควบคุมตั้งค่าบัญชีผู้ใช้) | useraccountcontrolsettings |
User Accounts (จัดการบัญชีผู้ใช้) | control.exe /name Microsoft.UserAccounts |
Utility Manager (ตัวจัดการยูทิลิตี้) | utilman |
Version Reporter Applet (ตัวตรวจสอบเวอร์ชันวินโดวส์) | winver |
Volume Mixer (ปรับระดับเสียงบนเครื่อง) | sndvol |
Windows Action Center (ศูนย์แนะนำการใช้งาน) | wscui.cpl |
Windows Activation Client (ตัวจัดการยืนยันลิขสิทธิ์) | slui |
Windows Anytime Upgrade (เปิดอัปเกรดวินโดวส์) | WindowsAnytimeUpgradeui |
Windows Anytime Upgrade Results (ผลลัพธ์อัปเกรดวินโดวส์) | windowsanytimeupgraderesults |
Windows Disc Image Burning Tool (เครื่องมือเบิร์นแผ่นดิสก์) | isoburn |
Windows DVD Maker (เครื่องมือสร้างแผ่น DVD) | dvdmaker |
Windows Easy Transfer (ตัวช่วยถ่ายโอนข้อมูลบนวินโดวส์) | migwiz |
Windows Explorer (เปิด Windows Explorer) | explorer |
Windows Fax and Scan (หน้าต่างเครื่องแฟกซ์และสแกน) | wfs |
Windows Features (ตัวจัดการฟีเจอร์บนวินโดวส์) | optionalfeatures |
Windows Firewall (จัดการ Windows Firewall) | firewall.cpl |
Windows Journal (เปิดบันทึกวารสาร) | journal |
Windows Media Player (เครื่องเล่นมีเดีย หรือ โปรแกรมดูหนังฟังเพลง) | wmplayer |
Windows Memory Diagnostic Scheduler (ตั้งเวลาตรวจเช็คหน่วยความจำ) | mdsched |
Windows Mobility Center (ศูนย์รวมตัวจัดการเครื่องมือเคลื่อนที่) | mblctr |
Windows PowerShell (เปิดหน้าต่างคำสั่ง PowerShell) | powershell |
Windows PowerShell ISE (เปิดหน้าต่างคำสั่ง PowerShell ISE) | powershell_ise |
Windows Remote Assistance (ตัวช่วยเหลือรีโมทควบคุมวินโดวส์) | msra |
Windows Repair Disc (เปิดระบบซ่อมแซมแผ่นดิสก์) | recdisc |
Windows Script Host (เปิด Windows Script Host) | wscript |
Windows Update (ตัวอัพเดทวินโดวส์) | wuapp |
Windows Update Standalone Installer (ตัวติดตั้ง Windows Update แบบ Standalone) | wusa |
WMI Management (ตัวจัดการ WMI) | wmimgmt.msc |
WordPad (เปิด WordPad) | write |
XPS Viewer (เปิดดูไฟล์ XPS) | xpsrchvw |