Задайте вопросЗадайте вопрос
 

Предложенный ответFileSystemAccessRule: everyone group

  • 29 мая 2007 г. 15:46vistapolar Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     

    I am developping an installer class and I want to set specific permissions for all users. I know that this is possible with a code like this:

    Dim dirSec As New DirectorySecurity

    dirSec = Directory.GetAccessControl(dirPath)

    dirSec.AddAccessRule(New FileSystemAccessRule("Everyone", FileSystemRights.FullControl, InheritanceFlags.ContainerInherit Or InheritanceFlags.ObjectInherit, PropagationFlags.InheritOnly, AccessControlType.Allow))

    Directory.SetAccessControl(dirPath, dirSec)

     

    Unhopefully I need this code to be valid for computers with different InstalledUICulture. For instance I know that in German it is sufficient to replace "Everyone" with "Jeder". Is it possible to call a method that permits to generalize the code for every language of the operating system?

     

    Thanks in advance

Все ответы