Hello Folks,
So I recently discovered the PowerShell App Deployment Toolkit and to try it out, I’ve created a package to install Xming. What I am finding out is that if I run the native Xming installer directly, it requires admin rights and prompts for elevation as expected - this results in desktop and start menu shortcuts being created for all users.
Here’s my environment:
PowerShell App Deployment Toolkit v3.7.0
Windows PowerShell v5.1
Windows 10 v1803 x64 Client
SCCM 2016 Current Branch
I then proceed to wrap the installer with PSADT, which uses the built-in " Execute-Process " cmdlet to call the Xming installer. Now to run the PSADT installer, I am calling " Deploy-Application.exe " which seems to elevate privileges, but I noticed that while it creates the Start Menu icons, it fails to create the Desktop Shortcuts for all users ( i.e., I don’t see the links created at C:\Users\Public\Desktop ).
I then proceeded to create an application in SCCM and deployed it to my test PC and observed the same behavior (i.e., Xming installed correctly with Start Menu icons, but no desktop shortcuts for all users). I did notice, however, that the desktop shortcuts are created for the current users. So I attempted to use the " Copy-File " cmdlet to copy the shortcuts from the Start Menu to the All Users Desktop location, however, that fails silently (haven’t been able to find any reference in the Event Viewer or the application logs for the PSADT install).
So now I’m thinking that somehow privilege escalation is failing. I know that the SCCM Client process runs as the SYSTEM user, so it should have elevated privileges. As such, any child processes it creates should also be elevated - right?
Has anybody out there run into this trouble before? If so, how did you address it? Any help is appreciated.
TO-DO: When I get into the office today (while waiting for your responses), I’ll attempt to use SysInternals’ Process Explorer and Process Monitor to see if I can debug what’s going on.