【问题标题】:Windows API for Creating User Profile用于创建用户配置文件的 Windows API
【发布时间】:2011-03-24 14:42:51
【问题描述】:

我正在尝试查找用于创建用户配置文件的 Window API。

我正在 Windows 中创建本地用户,并且我正在尝试使用设置了 LOGON_WITH_PROFILE 标志的 CreateProcessWithLogonW 与该用户一起运行进程。

由于配置文件不存在(用户尚未交互登录),因此 CreateProcessWithLogonW 失败。

当与该用户执行交互式登录然后运行程序时,它可以工作。

任何人都知道如何使用 Win32 API 创建用户配置文件?

谢谢! 利奥

【问题讨论】:

    标签: windows winapi profile


    【解决方案1】:

    尝试使用 User Profiles API(请参阅 http://msdn.microsoft.com/en-us/library/bb776901.aspx)。在 Vista 及更高版本上,您可以使用 CreateProfile。在旧系统上,您可以使用LogonUserLoadUserProfileUnloadUserProfile(参见http://msdn.microsoft.com/en-us/library/bb762281.aspx)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-06-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-14
      • 1970-01-01
      • 1970-01-01
      • 2010-12-26
      相关资源
      最近更新 更多