Windows API for Creating User Profile

六月ゝ 毕业季﹏ 提交于 2019-11-30 17:37:51

问题


I'm trying to find the Window API for creating user profile.

I'm creating local user in windows, and i'm trying to run process with this user using CreateProcessWithLogonW with LOGON_WITH_PROFILE flag set.

Since the profile does not exist (the user was not interactively logged on yet) the CreateProcessWithLogonW fails.

When performing interactive logon with this user and then running the program it works.

Anyone knows how can I create user profile using Win32 API?

Thanks! Lior


回答1:


Try with User Profiles API (see http://msdn.microsoft.com/en-us/library/bb776901.aspx). On Vista and later you can use CreateProfile. On old systems you can use LogonUser and LoadUserProfile, UnloadUserProfile (see http://msdn.microsoft.com/en-us/library/bb762281.aspx).



来源:https://stackoverflow.com/questions/3394777/windows-api-for-creating-user-profile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!