synchronicity wrote: Fri Mar 27, 2026 2:32 am
Does anyone know what could typically cause this?
Does anything appear in the error log, if you enable error logging?
On Windows, does wimlib_global_init() automatically enable privileges like SeBackupPrivilege / SeRestorePrivilege?
Yes, it enables those by default.
I encountered a permission issue when using wimlib's wimlib_extract_image function on Windows. The details are as follows:
Log output:
[WARNING] Can't create symbolic link "F:\Users\All Users"!
(Need Administrator rights, or at least the
SeCreateSymbolicLink privilege.)
[ERROR] Can't open "F:\Program Files\WindowsApps\Microsoft.ZuneVideo_10.19071.19011.0_x64__8wekyb3d8bbwe\GlassVertexShader.cso" to set metadata (status=c0000022): {Access Denied}
A process tried to access an object but did not have the required permissions.
Steps I have tried:
I used wimlib_set_error_file_by_name in my code to capture detailed logs.
For the symbolic link warning, I requested the SE_CREATE_SYMBOLIC_LINK_NAME privilege in my program. After that, the warning [WARNING] Can't create symbolic link "F:\Users\All Users"! disappeared.
Remaining issue:
The following error still occurs:
[ERROR] Can't open "F:\Program Files\WindowsApps\Microsoft.ZuneVideo_10.19071.19011.0_x64__8wekyb3d8bbwe\GlassVertexShader.cso" to set metadata (status=c0000022): {Access Denied}
A process tried to access an object but did not have the required permissions.
I suspect this is related to NTFS permissions on system files inside the WindowsApps folder. Even running the program as Administrator may not allow wimlib to open certain system files to set metadata.
Questions / Seeking advice:
Is there a way to allow wimlib to successfully set metadata on these system files in Windows?
Are special privileges or security policy changes required?
Are there any feasible workarounds to avoid the status=c0000022 error?