Hi mọi người,

Hiện tại mình đang có nhu cầu lấy thông tin permission của một file dưới quyền account SYSTEM (Không phải Administrator hay User).
Mình muốn lấy thông tin các file trong thư mục C:\Windows\Fonts.

Ví dụ file Arial.ttf, khi xem permission của file này bằng Properties của Windows, thì mình thấy account SYSTEM có 2 quyền là Read & Execute và Read.
Mình đã thử dùng qua GetNamedSecurityInfo và GetExplicitEntriesFromAcl nhưng bị vướng ở chỗ:

1. Làm sao xác định được SYSTEM account với struct EXPLICIT_ACCESS.
2. Có một số file không lấy được DACL. Ví dụ như font mình cài thêm là VniOngDo.ttf.
Mình đọc trên mạng thì thấy

3) Function GetExplicitEntriesFromAcl returned a record count ace == 0
If to add the ace in dasl then function returns their amount.
It turns out dacl forms automatically as inheritance is included, but records ace are not copied in it from parents
Nếu vậy thì mình sẽ lấy permission của SYSTEM account với những file này bằng cách nào.

Cảm ơn mọi người.
Thân.