Yearly Archive 2023-08-12

Byphunsanit

Winget: ติดตั้งโปรแกรมทั้งเครื่องหลาย ๆ เครื่องโดยการ Import Export

จากเรื่อง Winget: ติดตั้งดูแล programs ให้ง่าย ๆ แต่ปลอดภัย ที่จะ program จะติดตั้งเครื่องใหม่ ก็ทำได้เร็ว ๆ โดย export config จากเครื่องเดิมแล้วอิมพอร์ตในเครื่องใหม่จะเร็วกว่าลงเองมาก

  1. เปิด Windows Terminal / PowerShell / Command Prompt (CMD) โดยใช้สิทธิ์ administrator
  2. ใช้คำสั่ง winget export path ที่ต้องการเก็บไฟล์ เช่น winget export C:\Users\Shared\winget.json จะเห็นรายชื่อโปรแกรมที่ติดตั้งในเครื่องออกมา เช่น
    แม้แต่โปรแกรมที่ไม่ได้ติดตั้งโดยใช้ winget เองก็แสดงมาในรายชื่อนี้เหมือนกัน
    Installed package is not available from any source: Android Studio
    Installed package is not available from any source: Intel® Graphics Command Center
    Installed package is not available from any source: Avast Free Antivirus
    Installed package is not available from any source: Avast Secure Browser
    Installed package is not available from any source: Microsoft Clipchamp
    Installed package is not available from any source: Dataflare
    Installed package is not available from any source: Dolby Audio
    Installed package is not available from any source: Microsoft Office Home and Student 2021 – en-us
    Installed package is not available from any source: GDR 1105 for SQL Server 2022 (KB5029379) (64-bit)
    Installed package is not available from any source: GDR 1110 for SQL Server 2022 (KB5032968) (64-bit)
    Installed package is not available from any source: K-Lite Mega Codec Pack 18.0.5
    Installed package is not available from any source: Lenovo Now
    Installed package is not available from any source: Microsoft Edge Update
    Installed package is not available from any source: Microsoft Help Viewer 2.3
    Installed package is not available from any source: Microsoft SQL Server 2022 (64-bit)
    Installed package is not available from any source: Cortana
    Installed package is not available from any source: News
    Installed package is not available from any source: MSN Weather
    Installed package is not available from any source: Get Help
    Installed package is not available from any source: Microsoft Tips
    Installed package is not available from any source: HEIF Image Extensions
    Installed package is not available from any source: HEVC Video Extensions from Device Manufacturer
    Installed package is not available from any source: English (United States) Local Experience Pack
    Installed package is not available from any source: ชุดประสบการณ์ใช้งานภาษาท้องถิ่นไทย
    Installed package is not available from any source: Microsoft Edge
    Installed package is not available from any source: Microsoft 365 (Office)
    Installed package is not available from any source: Solitaire & Casual Games
    Installed package is not available from any source: Microsoft Sticky Notes
    Installed package is not available from any source: Microsoft .Net Native Framework Package 2.2
    Installed package is not available from any source: Microsoft .Net Native Runtime Package 2.2
    Installed package is not available from any source: OneDrive
    Installed package is not available from any source: Outlook for Windows
    Installed package is not available from any source: Power Automate
    Installed package is not available from any source: Raw Image Extension
    Installed package is not available from any source: Snipping Tool
    Installed package is not available from any source: Windows Security
    Installed package is not available from any source: Microsoft Engagement Framework
    Installed package is not available from any source: Store Experience Host
    Installed package is not available from any source: Microsoft To Do
    Installed package is not available from any source: Microsoft Visual C++ 2015 UWP Runtime Package
    Installed package is not available from any source: VP9 Video Extensions
    Installed package is not available from any source: Web Media Extensions
    Installed package is not available from any source: Webp Image Extensions
    Installed package is not available from any source: Windows App Runtime DDLM 3000.934.1904.0-x6
    Installed package is not available from any source: Windows App Runtime DDLM 3000.934.1904.0-x8
    Installed package is not available from any source: Windows App Runtime DDLM 4000.964.11.0-x6
    Installed package is not available from any source: Windows App Runtime DDLM 4000.964.11.0-x8
    Installed package is not available from any source: Microsoft Photos
    Installed package is not available from any source: Windows Clock
    Installed package is not available from any source: WindowsAppRuntime.1.2
    Installed package is not available from any source: WindowsAppRuntime.1.3
    Installed package is not available from any source: WindowsAppRuntime.1.4
    Installed package is not available from any source: Windows Calculator
    Installed package is not available from any source: Windows Camera
    Installed package is not available from any source: Feedback Hub
    Installed package is not available from any source: Windows Maps
    Installed package is not available from any source: Windows Notepad
    Installed package is not available from any source: Windows Sound Recorder
    Installed package is not available from any source: Microsoft Store
    Installed package is not available from any source: Windows Package Manager Source (winget)
    Installed package is not available from any source: Xbox Game Bar Plugin
    Installed package is not available from any source: Game Bar
    Installed package is not available from any source: Xbox Identity Provider
    Installed package is not available from any source: Xbox Game Speech Window
    Installed package is not available from any source: Phone Link
    Installed package is not available from any source: Windows Media Player
    Installed package is not available from any source: Movies & TV
    Installed package is not available from any source: WinAppRuntime.Main.1.3
    Installed package is not available from any source: WinAppRuntime.Main.1.4
    Installed package is not available from any source: WinAppRuntime.Singleton
    Installed package is not available from any source: Windows Subsystem for Linux
    Installed package is not available from any source: Microsoft Teams
    Installed package is not available from any source: Windows Web Experience Pack
    Installed package is not available from any source: Mozilla Maintenance Service
    Installed package is not available from any source: Notepad++
    Installed package is not available from any source: Spotify Music
    Installed package is not available from any source: WinMerge
    Installed package is not available from any source: Mail and Calendar
    Installed package is not available from any source: vs_CoreEditorFonts
    Installed package is not available from any source: Microsoft .NET SDK 8.0.101 (x64) from Visual Studio
    Installed package is not available from any source: Windows SDK AddOn
    Installed package is not available from any source: Microsoft ODBC Driver 17 for SQL Server
    Installed package is not available from any source: Node.js
    Installed package is not available from any source: Azure Data Studio
    Installed package is not available from any source: Microsoft Visual Studio Installer
    Installed package is not available from any source: Microsoft Teams Meeting Add-in for Microsoft Office
    Installed package is not available from any source: Microsoft VSS Writer for SQL Server 2022
    Installed package is not available from any source: Windows Subsystem for Linux
    Installed package is not available from any source: Microsoft SQL Server 2022 Setup (English)
    Installed package is not available from any source: Microsoft Update Health Tools
    Installed package is not available from any source: MongoDB Compass
    Installed package is not available from any source: Microsoft OLE DB Driver for SQL Server
    Installed package is not available from any source: Windows Subsystem for Linux Update
    Installed package is not available from any source: Browser for SQL Server 2022
    Installed package is not available from any source: Microsoft Visual Studio Tools for Applications 2019
    
  3. copy ไฟล์ที่ export ออกมา เช่น “C:\Users\Shared\winget.json” ไปเครื่องที่ต้องการอิมพอร์ต
  4. ใช้คำสั่ง winget import path ที่ต้องการเก็บไฟล์ เช่น winget import C:\Users\Shared\winget.json จะติดตั้งโปรแกรมที่อยู่ในไฟล์ตามลำดับ

ถ้าติดตั้งโปรแกรมวิธีนี้เร็ว ง่ายกว่าวิธีติดตั้งแบบเดิม ๆ มาก