Running command in user context when install is in system

Hi all,

Running SCCM - building af application for Citrix Receiver.

The deployment is done under the system account.

We kill citrix under the update. But after we are done.

I want to execute a command with param as the user currently logged in.

With the gui or in the script. Is this doable?

http://www.kylewise.net/citrix/citrix-receiver/receiver-selfservice-command-line-to-enumerate-apps-without-receiver-window-pop-up/

this line i want to run as the currently active user.
C:\Program Files (x86)\Citrix\SelfServicePlugin\SelfServicePlugin.exe -reconnectApps

As far as I’m aware there’s no way of executing anything under the user’s context using sccm.

This however might be of some help:
https://smsagent.blog/tag/task-sequence-user-context/

We have some deployments which run in the system context and we need to run something as the user that is currently logged on. Try using “Execute-ProcessAsUser”.

Execute-ProcessAsUser -Path “$envProgramFilesX86\Citrix\SelfServicePlugin\SelfServicePlugin.exe” -Parameters ‘-reconnectApp’

(Be careful with the quote/single-quote formatting if you copy and paste this)

1 Like

I will try that…
My deployment run in interactive mode

NAME
Execute-ProcessAsUser

SYNOPSIS
Execute a process with a logged in user account, by using a scheduled task, to provide interaction with user in
the SYSTEM context.