Computer >> Hướng Dẫn Máy Tính >  >> Hệ Thống >> Windows

Khắc phục lỗi "Namespace is already defined" khi mở Group Policy Editor trên Windows 11/10

Khi mở Local Group Policy Editor trên máy tính Windows, tôi nhận được thông báo lỗi sau:

Namespace 'Microsoft.Policies.Sensors.WindowsLocationProvider' is already defined as the target namespace for another file in the store.

Nhấn OK để đóng hộp thoại và tiếp tục làm việc trên Group Policy Editor. Vậy lỗi này là gì và tại sao lại xảy ra?

Nguyên nhân lỗi "Namespace is already defined"

Lỗi này xảy ra vì file LocationProviderADM.admx đã được đổi tên thành Microsoft-Windows-Geolocation-WLPAdm.admx trong Windows 10. Do đó, lỗi có thể xuất hiện trên một số hệ thống sau khi nâng cấp lên Windows 11/10.

Microsoft giải thích đây chỉ là lỗi thông tin (informational), nhấn OK và tiếp tục sẽ khiến GPEDIT hoạt động bình thường. Tuy nhiên, nếu muốn loại bỏ nguyên nhân gốc rễ, KB3077013 khuyến nghị xóa file LocationProviderADM.admx và LocationProviderADM.adml, sau đó đổi tên file Microsoft-Windows-Geolocation-WLPAdm.admx và Microsoft-Windows-Geolocation-WLPAdm.adml về tên đúng.

Các bước thực hiện:

  1. Tạo điểm khôi phục hệ thống (System Restore Point) trước.
  2. Mở Command Prompt với quyền quản trị viên (elevated) và chạy lệnh sau:
    takeown /F " C:\Windows\PolicyDefinitions\Microsoft-Windows-Geolocation-WLPAdm.admx" /A
  3. Tiếp theo chạy:
    takeown /F " C:\Windows\PolicyDefinitions\en-US\Microsoft-Windows-Geolocation-WLPAdm.adml" /A
  4. Cấp quyền Full Control (Kiểm soát đầy đủ) cho nhóm Administrators trên cả hai file. Mở C:\Windows\PolicyDefinitions, chuột phải file Microsoft-Windows-Geolocation-WLPAdm.admx > Properties > tab Security > Edit > chọn Full Control > Apply/OK. Làm tương tự cho file C:\Windows\PolicyDefinitions\en-US\Microsoft-Windows-Geolocation-WLPAdm.adml.
  5. Cuối cùng, đổi tên cả hai file thêm phần mở rộng .old.
  6. Khởi động lại máy tính. Thông báo lỗi sẽ biến mất.