go-win64api icon indicating copy to clipboard operation
go-win64api copied to clipboard

Hardcoding "Users" in UserAddEx makes the function fail on non-english devices

Open Morgane55440 opened this issue 2 years ago • 0 comments

Groups on non-english computers, are named according to the device's language, and as such there generally isn't any group named "User". for example, on my french work computer, the corresponding group is called "Utilisateurs".

Thus it is impossible to add a user to the "User" group, and if you try it results in the error code "unable to process. 2220" as one would expect.

this problem is also found in the functions setAdmin and RevokeAdmin. i have just started using this lib and i therefore do not know how prevalent similar issues may or may not be.

while i have yet to find a solution, i am looking into using SIDs, as mentioned in this stackoverflow thread

Morgane55440 avatar Oct 23 '23 13:10 Morgane55440