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

I searched on the Internet but cannot find what I need. Basically, during installation, we run a separate executable file, which basically redirects several folders for reading / writing to the EVERY group of users.

Now the one who wrote this never took into account the system language. I had a call with a client in France who did not complete the installation, because “EVERYONE” is not what we expect.

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

+5
source share
1 answer

The main error here is not so much in use EVERYONEas in the fact that the code uses names in general. Instead of using names, you should use known SIDs . In your case you need S-1-1-0.

+12
source

All Articles