Hi,
in response to PowerSheller's request to test the latest source which uses schtasks for user interaction. Some results.
Version tested: 3.6.0 - '12/17/2014' from Source Code.
Summary:
SCCM setup to: deploy Application as System and 'whether or not user logged in'.
Cmdline: "Deploy-Application.exe" (i.e. removed 'Serviceui' that I had been using with 3.5.0 and left all defaults in the config XML)
I show part of the log showing results when a non-admin console user is logged in when SCCM kicked off the deployment.
The 'Deploy-Application.ps1' was modified to show a welcome dialog and prompt to close running apps.
The expectation from version <=3.5.0 using serviceUI is that given a user is logged in and Outlook is running then the script should prompt, and that worked.
But for this test it installed the whole thing non-interactive because, as shown from this point in the log, it cant find a 'local admin' to relaunch the script?
```
"[Initialization] :: Function [Execute-ProcessAsUser] failed to execute successfully, or the Task Scheduler service is not in a healthy state, or no local admins are currently logged in to allow relaunching the toolkit under an admin account."
[Initialization] :: [AllowSystemInteractionFallback] option selected in the config XML file, falling back to SYSTEM context with no interaction...
```
Isn't the point of this to allow interaction to non-admins such as this user?
We cant have this fall back to silent install in session0 if there is a console user logged on and blocking apps are running.
Has anyone else been able to test this in such a way?
For the log below I then changed the config var 'Toolkit_AllowSystemInteractionFallback' to False so it would exit the script, but it does not and carries on, then fails later on trying to display a modal dialog (not shown here):
```
...
[Initialization] :: The task scheduler service is in a healthy state: True PSAppDeployToolkit 12/18/2014 5:06:25 PM 1 (0x0001)
[Initialization] :: Session 0 detected, process not running in user interactive mode. PSAppDeployToolkit 12/18/2014 5:06:25 PM 1 (0x0001)
[Initialization] :: 'Allow System Interaction' option is enabled in the toolkit config XML file. PSAppDeployToolkit 12/18/2014 5:06:25 PM 1 (0x0001)
[Initialization] :: The currently logged-on console user CPS\zintegrator is not a local admin and cannot be used to relaunch the toolkit to provide interaction in the SYSTEM context. PSAppDeployToolkit 12/18/2014 5:06:25 PM 1 (0x0001)
[Initialization] :: 'Allow System Interaction' for non console user is enabled in the toolkit config XML file. PSAppDeployToolkit 12/18/2014 5:06:25 PM 1 (0x0001)
[Initialization] :: No local admins are currently logged in to allow relaunching the toolkit under an admin account to provide interaction in the SYSTEM context. PSAppDeployToolkit 12/18/2014 5:06:25 PM 1 (0x0001)
[Initialization] :: Function [Execute-ProcessAsUser] failed to execute successfully, or the Task Scheduler service is not in a healthy state, or no local admins are currently logged in to allow relaunching the toolkit under an admin account. PSAppDeployToolkit 12/18/2014 5:06:25 PM 1 (0x0001)
[Initialization] :: [AllowSystemInteractionFallback] option was not selected in the config XML file, so toolkit will not fall back to SYSTEM context with no interaction. Exiting script... PSAppDeployToolkit 12/18/2014 5:06:25 PM 1 (0x0001)
[Pre-Installation] :: Function Start Show-InstallationWelcome 12/18/2014 5:06:25 PM 1 (0x0001)
[Pre-Installation] :: Function invoked with bound parameter(s):
Parameter Value
--------- -----
[-CheckDiskSpace] True
[-DeferTimes] 3
[-PersistPrompt] True
[-CloseApps] SfdcMsOl=Salesforce For Outlook,Outlook
[-BlockExecution] True
[-AllowDefer] True
Show-InstallationWelcome 12/18/2014 5:06:25 PM 1 (0x0001)
[Pre-Installation] :: Evaluate disk space requirements. Show-InstallationWelcome 12/18/2014 5:06:25 PM 1 (0x0001)
[Pre-Installation] :: Function Start Get-FreeDiskSpace 12/18/2014 5:06:25 PM 1 (0x0001)
...
```
Comments: For now this is the intended behavior. I had already talked about it on a different issue: http://psappdeploytoolkit.codeplex.com/workitem/116 I think that the fallback to proceed with the installation on the session 0 would be exactly what we are looking in order to replace ServiceUI, but that's not how it was implemented. It will only work if the user is an admin as everything will run under the user context.
in response to PowerSheller's request to test the latest source which uses schtasks for user interaction. Some results.
Version tested: 3.6.0 - '12/17/2014' from Source Code.
Summary:
SCCM setup to: deploy Application as System and 'whether or not user logged in'.
Cmdline: "Deploy-Application.exe" (i.e. removed 'Serviceui' that I had been using with 3.5.0 and left all defaults in the config XML)
I show part of the log showing results when a non-admin console user is logged in when SCCM kicked off the deployment.
The 'Deploy-Application.ps1' was modified to show a welcome dialog and prompt to close running apps.
The expectation from version <=3.5.0 using serviceUI is that given a user is logged in and Outlook is running then the script should prompt, and that worked.
But for this test it installed the whole thing non-interactive because, as shown from this point in the log, it cant find a 'local admin' to relaunch the script?
```
"[Initialization] :: Function [Execute-ProcessAsUser] failed to execute successfully, or the Task Scheduler service is not in a healthy state, or no local admins are currently logged in to allow relaunching the toolkit under an admin account."
[Initialization] :: [AllowSystemInteractionFallback] option selected in the config XML file, falling back to SYSTEM context with no interaction...
```
Isn't the point of this to allow interaction to non-admins such as this user?
We cant have this fall back to silent install in session0 if there is a console user logged on and blocking apps are running.
Has anyone else been able to test this in such a way?
For the log below I then changed the config var 'Toolkit_AllowSystemInteractionFallback' to False so it would exit the script, but it does not and carries on, then fails later on trying to display a modal dialog (not shown here):
```
...
[Initialization] :: The task scheduler service is in a healthy state: True PSAppDeployToolkit 12/18/2014 5:06:25 PM 1 (0x0001)
[Initialization] :: Session 0 detected, process not running in user interactive mode. PSAppDeployToolkit 12/18/2014 5:06:25 PM 1 (0x0001)
[Initialization] :: 'Allow System Interaction' option is enabled in the toolkit config XML file. PSAppDeployToolkit 12/18/2014 5:06:25 PM 1 (0x0001)
[Initialization] :: The currently logged-on console user CPS\zintegrator is not a local admin and cannot be used to relaunch the toolkit to provide interaction in the SYSTEM context. PSAppDeployToolkit 12/18/2014 5:06:25 PM 1 (0x0001)
[Initialization] :: 'Allow System Interaction' for non console user is enabled in the toolkit config XML file. PSAppDeployToolkit 12/18/2014 5:06:25 PM 1 (0x0001)
[Initialization] :: No local admins are currently logged in to allow relaunching the toolkit under an admin account to provide interaction in the SYSTEM context. PSAppDeployToolkit 12/18/2014 5:06:25 PM 1 (0x0001)
[Initialization] :: Function [Execute-ProcessAsUser] failed to execute successfully, or the Task Scheduler service is not in a healthy state, or no local admins are currently logged in to allow relaunching the toolkit under an admin account. PSAppDeployToolkit 12/18/2014 5:06:25 PM 1 (0x0001)
[Initialization] :: [AllowSystemInteractionFallback] option was not selected in the config XML file, so toolkit will not fall back to SYSTEM context with no interaction. Exiting script... PSAppDeployToolkit 12/18/2014 5:06:25 PM 1 (0x0001)
[Pre-Installation] :: Function Start Show-InstallationWelcome 12/18/2014 5:06:25 PM 1 (0x0001)
[Pre-Installation] :: Function invoked with bound parameter(s):
Parameter Value
--------- -----
[-CheckDiskSpace] True
[-DeferTimes] 3
[-PersistPrompt] True
[-CloseApps] SfdcMsOl=Salesforce For Outlook,Outlook
[-BlockExecution] True
[-AllowDefer] True
Show-InstallationWelcome 12/18/2014 5:06:25 PM 1 (0x0001)
[Pre-Installation] :: Evaluate disk space requirements. Show-InstallationWelcome 12/18/2014 5:06:25 PM 1 (0x0001)
[Pre-Installation] :: Function Start Get-FreeDiskSpace 12/18/2014 5:06:25 PM 1 (0x0001)
...
```
Comments: For now this is the intended behavior. I had already talked about it on a different issue: http://psappdeploytoolkit.codeplex.com/workitem/116 I think that the fallback to proceed with the installation on the session 0 would be exactly what we are looking in order to replace ServiceUI, but that's not how it was implemented. It will only work if the user is an admin as everything will run under the user context.