NSIS AccessControl Plugin disable access to directory for all except Admins and System

StackOverflow https://stackoverflow.com/questions/22415426

  •  15-06-2023
  •  | 
  •  

Frage

I just read bunch of answers about setting permissions to directory by NSIS AccessControl plugin, but all those only show basic usage copy pasted from plugin site... It only shows cases ALL or NOTHING... but how do I disable ALL permissions to directory for everyone except System and Administrators?

War es hilfreich?

Lösung

AccessControl::DisableFileInheritance "$temp\test.tmp"
Pop $0
DetailPrint $0

AccessControl::ClearOnFile "$temp\test.tmp" "(S-1-5-18)" "FullAccess"
Pop $0
DetailPrint $0

AccessControl::SetOnFile "$temp\test.tmp" "(S-1-5-32-544)" "FullAccess"
Pop $0
DetailPrint $0

This might not be enough, you should probably also use SetFileOwner and maybe SetFileGroup...

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top