How can I work with Windows security groups without knowing their localized names in advance?
Asked Answered
R

1

6

I've searched around online but can't find what I'm after. Basically, during an install, we fire off a separate executable that basically brute forces a few folders to be read/write enabled for the user group "EVERYONE".

Now, the person that wrote this never took into consideration system language. I had a call with a customer in France that kept failing installation because "EVERYONE" isn't what we would expect.

I'm after an API call to Windows that would return a security group name which would be "safe" to use in a localized environment. Essentially I'm looking to safely edit this code so instead of hardcoding in "EVERYONE", we call a function instead.

Rowen answered 27/6, 2012 at 16:4 Comment(0)
N
13

The fundamental mistake here is not so much the use of EVERYONE, but rather that the code is using names at all. Instead of using names you should use the well-known SIDs. In your case you need S-1-1-0.

Noaccount answered 27/6, 2012 at 16:20 Comment(1)
This blog post from the Jedi guys may help: What is a SID?Bozovich

© 2022 - 2024 — McMap. All rights reserved.