Adam: I’d like to better understand your process in SCCM as I’d like to accomplish the same.
I’ve not been able to work through some roadblocks I’ve discovered.
Pre-SCCM
PSAD solved a lot of annoyances so I converted everything from batch, vbscript and some proprietary format to PoSH for use with PSAD.
Because PSAD is updated regularly - which is great - I decided to store everything in two locations:
<li>Network location: \\dfs\share\path\to\psad</li>
The Deploy-Application.ps1 template has been modified slightly to prefer the local but fall back on the network location.
And when a new version comes out we can quickly update:
- The clients via GPO/GPP, Login script, our current software delivery solution etc.
- The network by way of some dude responsible for updating the DFS share (namely me)
When I prepare an application, I:
Use our Deploy-Application.ps1 template
I use absolute paths (UNC mostly) in the .PS1's for all the files: the installers, files that need to be copied over like configuration files & shortcuts, .REG files that need to be merged etc.
Create a shortcut (.LNK) that calls:
C:\PSAD\Deploy-Application.exe "\\server\share\absolute\path\to\Deploy-App1.ps1"
When someone needs to install an application, like Visio, they run Install_Visio.lnk (e.g.: \server\share\path\to\Install_Visio.lnk) and everything runs beautifully.
Post SCCM
We just implemented SCCM - a small upgrade from MDT 2013 - and I’m now pulling in applications.
But since SCCM copies everything locally, I’m hitting a wall on how I can continue to use the centralized method above or one similar to it.
On a test machine I have the PSAD files locally and a manual test installation this way works fine:
c:\psad\deploy-application.exe "\server\share\absolute\path\to\Deploy-App1.ps1"
I then copy those install files locally to C:\Windows\ccmcache\1, simulating an SCCM deployment, and test again manually which works fine:
c:\psad\deploy-application.exe "C:\Windows\ccmcache\1\Deploy-App1.ps1"
I add the C:\PSAD path to my PATH environment variable and try once more which also works fine:
deploy-application.exe "C:\Windows\ccmcache\1\Deploy-App1.ps1"
Well, there’s no way of knowing what the SCCM directory name will be ahead of time, but since SCCM executes from that random directory within ccmcache, my thinking was:
If I execute deploy-application.exe from the same location where Deploy-App1.ps1 lives, it’ll just work itself out.
I was sorely mistaken: If I do the following from within an elevated command prompt in C:\Windows\ccmcache\1:
deploy-application.exe Deploy-App1.ps1
It assumes Deploy-App.ps1 lives in the same location as Deploy-Application.exe and fails with:
A critical component of the App Deployment Toolkit is missing.
Unable to find the App Deploy Script file: C:\PSAD\Deploy-App.ps1
Please ensure you have all of the required files available to start the installation.
To be sure running the following from within an elevated command prompt in C:\Windows\ccmcache\1 also doesn’t work:
c:\psad\deploy-application.exe Deploy-App1.ps1
The only way to overcome that is to keep Deploy-Application.exe with Deploy-App.ps1.
But by virtue of doing that, one has to keep all the other required PSAD files otherwise this happens:
A critical component of the App Deployment Toolkit is missing.
Unable to find the 'AppDeployToolkit' folder.
Please ensure you have all of the required files available to start the installation.
So we’re back to square one: We have to add the PSAD files to every package and when a new update is released, we have to somehow update all those PSAD files for each application then update the content for all applications in SCCM and redistribute.
Short of doing that, is there another approach that’s working for others?