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

วิธีซ่อนโปรแกรมที่ติดตั้งไว้ใน Windows 10 และ 11

บทความนี้จะแสดง วิธีซ่อนโปรแกรมใดๆ ออกจากรายการ Installed Apps ใน Control Panel ใช้ได้กับทุก Windows Version ตั้งแต่ Windows XP ถึง Build ล่าสุดของ Windows 10 และ 11

วิธีซ่อนโปรแกรมเฉพาะตัวจาก Settings/Control Panel

สมมติ ต้องการซ่อน Entry ของโปรแกรม Gimp (Image Editor) เปิด Control Panel -> Programs and Features ตรวจสอบว่า Entry Gimp 2.10.28 อยู่ในรายการ

วิธีซ่อนโปรแกรมที่ติดตั้งไว้ใน Windows 10 และ 11

หาได้ใน Modern Settings UI ด้วย (Settings -> Apps)

วิธีซ่อนโปรแกรมที่ติดตั้งไว้ใน Windows 10 และ 11

ซ่อน Entry ผ่าน Windows Registry ก่อนต้องเข้าใจว่า Windows สร้างรายการ Installed Programs จาก Registry Keys ใดบ้าง ข้อมูลโปรแกรมติดตั้งอยู่ใน 3 Registry Keys:

  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall – รายการโปรแกรมสำหรับ All Users;
  • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall – Entries ของ x86 Apps บน x64 Windows;
  • HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall – Apps ที่ติดตั้งสำหรับ Current User เท่านั้น

Windows สร้างรายการโปรแกรมที่คุณเห็นใน Settings/Control Panel จาก Entries ใน Registry Keys เหล่านี้

ในกรณีของผม GIMP ติดตั้งผ่าน Winget Package Manager เฉพาะ User Profile ดังนั้น Entry อยู่ใน User Registry Hive HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall

หา Reg Key ของ Application (ตัวอย่าง: GIMP-2_is1) สร้าง 32-bit DWORD Registry Parameter ชื่อ SystemComponent ค่า 1: SystemComponent = dword: 00000001

วิธีซ่อนโปรแกรมที่ติดตั้งไว้ใน Windows 10 และ 11

Refresh หน้าต่างรายการโปรแกรม (กด F5) Entry GIMP ควรหายไป

วิธีซ่อนโปรแกรมที่ติดตั้งไว้ใน Windows 10 และ 11

Entry ใน Modern Settings Panel ก็หายไปด้วย

วิธีซ่อนโปรแกรมที่ติดตั้งไว้ใน Windows 10 และ 11

Tip อีกวิธีซ่อนโปรแกรม: Rename Parameter DisplayName เป็น QuietDisplayName ใต้ Reg Key เดียวกัน

ซ่อนโปรแกรมจาก Command Prompt ได้ ตัวอย่างคำสั่งซ่อน 7-Zip (ใช้ใน Scripts/Batch Files):

REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-zip" /v SystemComponent /t REG_DWORD /d 1 /f

วิธีซ่อนโปรแกรมที่ติดตั้งไว้ใน Windows 10 และ 11

เพื่อแสดงโปรแกรมกลับมา: ลบ Parameter SystemComponent (หรือตั้งค่าเป็น 0 ด้วยคำสั่ง: REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-zip" /v SystemComponent /t REG_DWORD /d 0 /f) หรือ Rename QuietDisplayName กลับเป็น DisplayName

Tip หากต้องซ่อนทั้ง Application และ Service ที่เกี่ยวข้อง ใช้วิธีในบทความ “How to hide a Windows service from users?”

System Apps เช่น C++ Redistributables หรือ .NET Framework Versions ไม่สามารถซ่อนได้ด้วยวิธีนี้

ซ่อน Installed Apps ด้วย PowerShell Script

หากต้องซ่อนหลายโปรแกรมพร้อมกัน ใช้ PowerShell Script นี้ Variable AppsToHide ระบุรายการโปรแกรมที่จะซ่อน Script จะตรวจสอบ Registry Keys ทั้งหมด หา Keys ที่มี Program Entries และสร้าง/แก้ไข SystemComponent = 1 ในแต่ละ Key

รายละเอียดการจัดการ Registry จาก PowerShell ดูในบทความ How to Get, Create, Edit, and Delete Registry Keys with PowerShell?

$RegPaths = @(
"HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*",
"HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*",
"HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*"
)
$AppsToHide = @(
"*GIMP*",
"*7-Zip*",
"*Teams*",
"*Firefox*",
)
foreach ($App in $AppsToHide) {
foreach ($Path in $RegPaths) {
$AppKey = (Get-ItemProperty $Path -ErrorAction SilentlyContinue| Where-Object { $_.DisplayName -like $($App) }).PSPath
if ($null -ne $AppKey) {
$SystemComponent = Get-ItemProperty $AppKey -Name SystemComponent -ErrorAction SilentlyContinue
if (!($SystemComponent)) {
New-ItemProperty "$AppKey" -Name "SystemComponent" -Value 1 -PropertyType DWord
}
else {
$SystemComponentValue = (Get-ItemProperty $AppKey -Name SystemComponent -ErrorAction SilentlyContinue).SystemComponent
if ($SystemComponentValue -eq 0) {
Set-ItemProperty "$AppKey" -Name "SystemComponent" -Value 1
}
}
}
}
}

วิธีซ่อนโปรแกรมที่ติดตั้งไว้ใน Windows 10 และ 11

ตัวอย่าง Script ซ่อน Teams, Gimp, Firefox, 7-zip สามารถ Deploy Script นี้ผ่าน GPO ไปเครื่องใน Domain

ซ่อน Installed Apps ทั้งหมดจาก User อื่นๆ

ซ่อนโปรแกรมติดตั้งทั้งหมดจาก Control Panel ของ User ได้ โดยแก้ Local Group Policy Parameter

เปิด Local GPO Editor (gpedit.msc) ไป: User Configuration -> Administrative Templates -> Control Panel -> Programs Enable Policy Hide “Programs and Features” page

วิธีซ่อนโปรแกรมที่ติดตั้งไว้ใน Windows 10 และ 11

Update GPO: gpupdate /force ตรวจสอบว่า “Programs and Features” ใน Control Panel ไม่อยู่แล้ว จะแสดง “Your system administrator has disabled Programs and Features”

วิธีซ่อนโปรแกรมที่ติดตั้งไว้ใน Windows 10 และ 11

ป้องกันไม่ให้แสดงรายการโปรแกรมติดตั้งใน Control Panel ด้วยคำสั่ง:

REG add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Programs" /v NoProgramsCPL /t REG_DWORD /d 1 /f
REG add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Programs" /v NoProgramsAndFeatures /t REG_DWORD /d 1 /f