I'm currently trying to find out where I can change the display name of a windows account with C#. After a while of searching I found the "NetUserSetInfo" function provided by the netapi32.dll. But to me it looks like the display name can only be changed by providing a ton of other parameters with the "_USER_INFO_22" struct (https://learn.microsoft.com/de-de/windows/desktop/api/lmaccess/ns-lmaccess-_user_info_22).
Is there maybe an other or even an easier way to change the display name? (For clearance: I don't want to change the account name. I want to change the display name [the one that gets shown on login in Windows 10]).
It looks like NetUserSetInfo(..., 1011, ...)
and the USER_INFO_1011
structure allow setting that name individually.