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

วิธีสร้าง Restore Point ด้วย Command Prompt บน Windows

หากคอมพิวเตอร์ Windows ของคุณมีปัญหา คุณสามารถกู้คืนคอมพิวเตอร์ไปยัง Restore Point ก่อนหน้านี้ที่ทำงานได้โดยไม่มีปัญหา การสร้าง Restore Point โดยใช้กล่องโต้ตอบ System Restore ใน Windows 11 และ 10 ง่าย แต่หากคุณต้องการสร้างเป็นประจำ มีวิธีที่เร็วกว่า

ที่นี่เราจะแสดงวิธีสร้างและใช้ Restore Point โดยใช้ Command Prompt และ PowerShell

วิธีเปิดใช้งาน System Restore Points บน Windows

วิธีสร้าง Restore Point ด้วย Command Prompt บน Windows

System Restore เปิดใช้งานโดยค่าเริ่มต้นสำหรับไดรฟ์บูทของ Windows OS คุณสามารถตรวจสอบได้ว่า System Restore เปิดใช้งานบน PC ของคุณหรือไม่ โดยเข้าถึงการตั้งค่าการป้องกัน

  1. กด Win + S เพื่อเปิด Windows Search
  2. พิมพ์ restore point แล้วคลิกที่ตัวเลือก Create a Restore Point จากผลลัพธ์การค้นหา
  3. ภายใต้ส่วน Protection Settings ตรวจสอบว่า Protection ตั้งเป็น ON สำหรับไดรฟ์ Windows (C:) (System) ของคุณ
  4. หากไม่ใช่ ให้เลือกไดรฟ์และคลิกที่ Configure
  5. เลือก Turn on System protection
  6. ต่อไป กำหนดการใช้พื้นที่ดิสก์โดยใช้สไลเดอร์
  7. คลิก Apply และ OK เพื่อบันทึกการเปลี่ยนแปลง

วิธีสร้าง Restore Point โดยใช้ Command Prompt

วิธีสร้าง Restore Point ด้วย Command Prompt บน Windows

เพื่อสร้าง Restore Point คุณสามารถใช้เครื่องมือบรรทัดคำสั่ง Windows Management Instrumentation (WMI) นี่คือวิธีทำ

  1. กด Win และพิมพ์ cmd
  2. คลิกขวาที่ Command Prompt และเลือก Run as administrator
  3. ในหน้าต่าง Command Prompt ให้พิมพ์คำสั่งต่อไปนี้:
    wmic.exe /Namespace:\\root\default Path SystemRestore Call CreateRestorePoint "<My Restore Point Name >", 100, 7
  4. ในคำสั่งข้างต้น ให้แทนที่ <My Restore Point Name> ด้วยชื่อที่คุณชอบ แล้วกด Enter เพื่อรันคำสั่ง
  5. หากสำเร็จ คุณควรเห็นเอาต์พุตดังนี้:
    Executing (SystemRestore)->CreateRestorePoint()
    Method execution successful.
    Out Parameters:
    instance of __PARAMETERS
    {
    ReturnValue = 0;
    };
  6. ออกจากหน้าต่าง Command Prompt

วิธีใช้ System Restore จาก Command Prompt

วิธีสร้าง Restore Point ด้วย Command Prompt บน Windows

คุณสามารถใช้คำสั่ง rstrui.exe เพื่อเปิดยูทิลิตี้ System Restore จาก Command Prompt วิธีทำ:

  1. เปิด Command Prompt หากยังไม่ได้เปิด
  2. พิมพ์คำสั่งต่อไปนี้และกด Enter เพื่อรัน:
     rstrui.exe
  3. Command Prompt จะเปิดยูทิลิตี้ System Restore อย่างรวดเร็ว คุณสามารถเลือก Recommended restore หรือ Choose a different restore point เพื่อดำเนินต่อไป
  4. ปฏิบัติตามคำแนะนำบนหน้าจอเพื่อเสร็จสิ้น System Restore

หากคุณพบปัญหาระหว่างกระบวนการกู้คืน ให้ทำตามขั้นตอนเหล่านี้เพื่อแก้ไข System Restore ที่ไม่ทำงานบนคอมพิวเตอร์ Windows

วิธีสร้าง System Restore Point จาก Shortcut เดสก์ท็อป

วิธีสร้าง Restore Point ด้วย Command Prompt บน Windows

คุณสามารถสร้าง Shortcut เดสก์ท็อปเพื่อสร้าง Restore Point โดยใช้สคริปต์เครื่องมือบรรทัดคำสั่ง WMI ด้วยวิธีนี้ คุณไม่ต้องเปิด Command Prompt และรันคำสั่งทุกครั้งเพื่อสร้าง Restore Point

วิธีสร้าง Restore Point Shortcut:

  1. คลิกขวาที่เดสก์ท็อป และเลือก New > Shortcut
  2. ในหน้าต่าง Create Shortcut ให้พิมพ์คำสั่งต่อไปนี้สำหรับฟิลด์ Type the location of the item:
    cmd.exe /k "wmic.exe /Namespace:\\root\default Path SystemRestore Call CreateRestorePoint "My Shortcut Restore Point", 100, 7"
  3. ในคำสั่งข้างต้น ให้เปลี่ยน My Shortcut Restore Point เป็นชื่อที่คุณชอบ
  4. คลิกปุ่ม Next เพื่อดำเนินต่อไป
  5. ป้อนชื่อสำหรับ Shortcut ของคุณ และคลิก Finish
  6. คุณสามารถเพิ่มไอคอน Restore Point ให้กับ Shortcut ของคุณเพื่อระบุได้ง่าย โดยคลิกขวาที่ Restore Point shortcut และเลือก Properties
  7. คลิกปุ่ม Change icon ในหน้าต่าง Properties
  8. ในแถบที่อยู่ ให้พิมพ์เส้นทางต่อไปนี้และกด Enter:
    C:\Windows\System32\imageres.dll
  9. นี่จะโหลดไอคอนที่มีอยู่ทั้งหมด เลื่อนผ่านไอคอนและเลือกไอคอนที่เหมาะสม วิธีสร้าง Restore Point ด้วย Command Prompt บน Windows
  10. คลิก OK เพื่อบันทึกการเปลี่ยนแปลง

เพื่อสร้าง Restore Point ให้คลิกขวาที่ Shortcut และเลือก Run as administrator

หากคุณต้องการรัน Shortcut เป็น Administrator เสมอ ให้ไปที่ Properties > Shortcut > Advanced และเลือก Run as administrator คลิก OK และจากนั้น Apply เพื่อบันทึกการเปลี่ยนแปลง

วิธีสร้าง Restore Point โดยใช้ PowerShell

วิธีสร้าง Restore Point ด้วย Command Prompt บน Windows

คล้ายกับ Command Prompt คุณสามารถใช้ Windows PowerShell เพื่อสร้าง Restore Point ได้

  1. กด Windows key พิมพ์ powershell และเปิด Windows PowerShell จากผลลัพธ์การค้นหา
  2. ในคอนโซล PowerShell ให้พิมพ์คำสั่งต่อไปนี้:
    powershell.exe -ExecutionPolicy Bypass -NoExit -Command "Checkpoint-Computer -Description '<My Restore Point Name>' -RestorePointType 'MODIFY_SETTINGS'"
  3. ในคำสั่งข้างต้น ให้แทนที่ <My Restore Point Name> ด้วยชื่อที่คุณชอบ
  4. กด Enter เพื่อรันคำสั่ง PowerShell จะแสดงแถบความคืบหน้าเพื่อระบุสถานะ เมื่อเสร็จสิ้น ให้ปิดคอนโซล PowerShell

คล้ายกับ Command Prompt คุณสามารถใช้คำสั่ง rstrui.exe เพื่อเปิดยูทิลิตี้ System Restore เปิดคอนโซล PowerShell พิมพ์ rstrui.exe และกด Enter เพื่อรัน จากนั้นปฏิบัติตามคำแนะนำบนหน้าจอเพื่อเสร็จสิ้นกระบวนการ

สร้างและใช้ System Restore ได้อย่างรวดเร็วด้วย Command Prompt

System Restore ให้คุณยกเลิกการเปลี่ยนแปลงที่อาจทำให้ระบบทำงานผิดปกติ แทนที่จะจัดการกับกล่องโต้ตอบ System Restore คุณสามารถใช้ PowerShell หรือ Command Prompt เพื่อสร้าง Restore Point ได้

ทางเลือกอื่น คุณสามารถใช้สคริปต์ WIM บนบรรทัดคำสั่งเพื่อสร้าง Shortcut เดสก์ท็อปและสร้าง Restore Points ด้วยการดับเบิลคลิก