Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Windows

ใช้ Cortana สั่ง Restart, Shutdown, Sleep, Lock, Hibernate, Log Off บน Windows 11/10

Cortana ใน Windows 11/10 สามารถควบคุมการปิด/รีสตาร์ทเครื่องได้ด้วยคำสั่งเสียง ตั้งแต่ Windows 10 Fall Creators Update เป็นต้นมา สามารถพูดคำสั่งโดยตรงได้:

  • Hey Cortana, lock my computer
  • Hey Cortana, shut down my computer
  • Hey Cortana, restart my computer

วิธีสร้าง Shortcut ให้ Cortana สั่งงานระบบ (สำหรับเวอร์ชันเก่าหรือต้องการปรับแต่ง)

สร้าง Shortcut ในโฟลเดอร์:

C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

คำสั่งสำหรับแต่ละฟังก์ชัน

ฟังก์ชันคำสั่งชื่อ Shortcut
Shutdownshutdown.exe -s -t 10 (10 วินาที) หรือ shutdown.exe -s (ทันที)Shut Down
Restartshutdown.exe -rRestart
Log Offshutdown.exe -LLog Off
Hibernaterundll32.exe PowrProf.dll, SetSuspendStateHibernate
Sleeprundll32.exe powrprof.dll,SetSuspendState 0,1,0Sleep
Lockrundll32.exe user32.dll,LockWorkStationLock

หลังสร้าง Shortcut เรียบร้อย ให้พูด Hey Cortana, Open [ชื่อ Shortcut] (หรือ Start/Launch)

หาก Sleep/Hibernate ไม่ทำงาน ให้เปิด CMD รัน powercfg -a ตรวจสอบว่าเครื่องรองรับ Power State นั้นหรือไม่