0

We want to change file permissions for the windows default user group.

The problem is, depending on windows version (xp,win 7) and language, the name of this default user group differs. Sometimes the name of the group is "Benutzer", sometimes it is "User".

How can I get this name programmatically?

codymanix
  • 141
  • 1
  • 4
  • WTF is a 'default user group'? – Chris S Jul 20 '10 at 13:10
  • The user group which name is "Users" in english, that is normal users for the computer which have not admin rights. the group exists of every windows pc after installation. – codymanix Jul 20 '10 at 13:14
  • There's no difference in the name between versions, only languages. The name is Users regardless of whether it's W2K, WinXP, W2K3, Vista, W2K8, or Win7. – joeqwerty Jul 20 '10 at 13:17
  • No, in german Windows XP the name is "VORDEFINIERT/Benutzer" – codymanix Jul 20 '10 at 13:29
  • What I meant is that for each version there is a USERS group. There is no other name for the group. The name may translate differently in other languages but it still translates to USERS, as opposed to the name being something different, like BOB. – joeqwerty Jul 20 '10 at 14:08
  • Sure, but to change permission for that group, I need to specify the actual name for that group in my script... – codymanix Jul 20 '10 at 14:15

1 Answers1

2

You shouldn't be changing the name of the group. Rather, you should be referencing the group by its well-known SID. You can't guarantee what the names of built-in groups will be in other localized versions of Windows, or in future versions, but the well-known SIDs will stay the same.

Evan Anderson
  • 141,881
  • 20
  • 196
  • 331