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: Ok thanks, I agree with your comment (below) on that thread and I had assumed the coordinators were going to use Schtasks to only present dialogs to Std Users as needed, while the install runs in Session0. I hope the coordinators can clarify what they intend with the new code so we can have some idea of expected outcomes? . > dersonc wrote Dec 11 at 8:10 AM Got it... but as a suggestion one thing that could be done here is launching this process using the scheduled task just to run the interactive portion of the installation and once that finishes running you go back to the process running under the system context to perform the installation steps. That would allow us to have the close app messages, the deferral options and still install the application for the machine even if the user is not an admin.
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: Ok thanks, I agree with your comment (below) on that thread and I had assumed the coordinators were going to use Schtasks to only present dialogs to Std Users as needed, while the install runs in Session0. I hope the coordinators can clarify what they intend with the new code so we can have some idea of expected outcomes? . > dersonc wrote Dec 11 at 8:10 AM Got it... but as a suggestion one thing that could be done here is launching this process using the scheduled task just to run the interactive portion of the installation and once that finishes running you go back to the process running under the system context to perform the installation steps. That would allow us to have the close app messages, the deferral options and still install the application for the machine even if the user is not an admin.