Interacting with logged on user/user's environmental variables

How can I interact with the locally logged on user so I could copy files to the user's profile (like their desktop rather than the public desktop)?  I set the package's RunAs to "Deploy User (Interactive)" and I thought this would cause the process to run as the logged on user so I could use Windows variables like %USERPROFILE%.  But looking at Task Manager I noticed the process that starts does not have a user listed. So I redirected the set command to a text file and it looks like the interactive option still runs as the administrator's account, which make sense since that is what it is supposed to do.  So how do you determine who is logged on and then use that info?

0

Comments

3 comments
Date Votes
  • Hi Eddie,

    You need to use the Run As Logged On User. If more than one user is logged on the PDQ Deploy will run as the first user returned from the API call.

    Running as Deploy User (Interactive) solves a few potential problems such as needing an interactive session (some installations require it) that is guaranteed to have Administrator level access. When you need to access the logged on user's environment, however, then you need to use Logged On User.

    **Note** - If the step being performed as Logged On User requires administrative access the step may fail if the user is not an administrator.

    (Moved from Inventory - Questions forum to Deploy - Questions.

    0
  • Thanks.  I am disappointed I missed that in the documentation...I blame the size of my monitor. 8-)

    0
  • Shane, further to this question - how would I be able to copy to all users %userprofile%\AppData\Local\Google\Chrome\User Data\Default

    I can't seem to find the right way!

    going %appdata% brings me right to appdata\roaming

    I'm trying to copy the c:\Users\cdma\AppData\Local\Google\Chrome\User Data\Default\Bookmark (file is called bookmark, has no extension)

    To provide all my users with the same default bookmarks.

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post