Quantcast
Channel: PowerShell App Deployment Toolkit
Viewing all articles
Browse latest Browse all 2341

Commented Unassigned: Testing - "...user interaction in system context using scheduled tasks." [126]

$
0
0
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: No actually, I have some idea how tricky it is! :-) Being in the packaging game for a while this is probably the biggest hurdle for any such tool to workaround. Whether its tasks, [regkeys](http://csi-windows.com/toolkit/csi-msgq), or [impersonationy-type](http://www.autoitscript.com/forum/topic/104735-elevate-your-script-to-the-system-account/?hl=+system%20+elevate) solutions - they are all tricky to get right. We appreciate the perseverance!

Viewing all articles
Browse latest Browse all 2341

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>