How to create a shortcut in the start menu of another user without this user logging

Home Forums Server Operating Systems Windows Server 2008 / 2008 R2 How to create a shortcut in the start menu of another user without this user logging

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    jiangok
    Member
    #142852

    Hi,

    I am using window 2k8 R2 server and want to achieve (1) create a user and (2) add a shortcut to the start menu of this new user.

    In more detail, I tried to achieve this flow:

    Step 1: create a new user account;
    Step 2: call LogonUser (windows API) to log on this new user account by impersonating;
    Step 3: get the path to the start menu of this new user;
    Step 4: create and save a shelllink(shortcut) under the start menu path.

    Then the shortcut can start an app when the new user logs in first time.

    Step 3 failed because there is no user folder created for this new user even I have logged on the user account by impersonating.

    So I guess the only way to create the user folders (e.g. document, download, music, pictures, start menu…) is that the user physically logs on by himself for the first time.

    Is there a way to prepare the user folders and put the shortcut into the start menu for this user without the user physically logging on?

    Thanks for any idea.

    Thanks
    Leon

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.