Categories
Welcome Center
Education & Development
Discussions
Certification Preparation
Recent Posts
Groups
Free Resources
Ebooks
Free Workshops
Trending Certifications Infographic
Infosec Training
IT & Security Training
Live Boot Camps
Security Awareness Training
About Infosec Institute
Home
Discussions
Off Topic
SCCM package deploying problem
mikedisd2
AS usual I've been asked to produce the impossible with a system I have very little experience. I've trawled a heap of SCCM sites and can't come up with the answer as apparently these things can be done 100 different ways. Appreciate if anyone can point out where I'm wrong here.
I'm deploying a simple Win7x64 SOE from SCCM 2012 with a bunch of packages via an OSD task sequence. The packages are referenced in the TS using collection variables with a prefix of PACKAGES. The
prefix:
program
variables
are listed in the
collection variable
tab of a collection containing my pilot PC. Most packages use an .msi file and is executed with the command line
msiexec /i application.msi /qn
. And these deploy fine. Any other package where the command line references another file, doesn't, ie.
msiexec /i applfile.msi TRANSFORMS=appfile.mst /qn
, as don't pacakges where the command line deploys via a script (install.cmd).
The smsts.log returns a generic error code that is next to pointless. Manually installing the msi works fine and I'm sure all syntax is correct. As I can get all msi commands to deploy but not msi/mst or install.com commands, there must be something fundamentally wrong in my approach. So if anyone knows, what's the deal with deploying packages via OSD, How do I push out the msi files with a transform file? And how do I get bat files to execute? I imagine it's something to do with all relevant files being copied to the destination host.
But I'm new at this and would you believe they wanted this in 2 weeks(!) without any project planning (!!) from a guy who's still learning the product. Aint gonna happen.
Find more posts tagged with
Save $250 on 2025 certification boot camps from Infosec!
Book now with code EOY2025
Button
Comments
Zartanasaurus
Error logs in SCCM are a joke. I don't have any SCCM 2012 experience, just 2007. Generally speaking, if you can get your .cmd file to run in Windows it should run from an OSD TS.
I've never had a problem getting a program to install using a .cmd in the form of
msiexec.exe /QUIET /I %~dp0BlahBlah.msi TRANSFORMS=%~dp0BlahBlah.mst
The biggest problem I had was getting Windows Server Roles & Features to install on 64-bit OS using Powershell. Pain in the butt that was.
CodeBlox
The ONLY way I deploy packages in the OS Task sequence is by adding the program installation being run as a .bat file similar to what Zartanasaurus says.
ptilsen
Yeah, as shown, the issue is with relative path. The batch file doesn't start in the same relative path. There are three approaches to fix this:
1. Reference the relative path as Zaranasaurus showed. This can also be done with some code that finds the path of the script itself, rather than the %~dp0 variable.
2. Have the program use drive letters, then CD to the drive and path of the script using the code referenced above to programmatically determine that. Alternatively, have the program use a specific drive letter, and hard code that into your script (this is a really lame solution, FWIW).
3. Don't use a script, and run the whole command in the program. For a single MSI and MST, msiexec /i appfile.msi TRANSFORMS=appfile.mst /qn will work as long as appfile.msi and appfile.mst are both in the top-level directory of the package. Granted, if appfile.mst is in the sub-directory called, say, MSTs, the switch TRANSFORMS=MSTs\appfile.mst should work.
Generally speaking, 3 is the easiest, and 1 and 2 would only be if you need a script to run multiple actions.
One other tip is if you are ever packaging an application that is failing, one possibility is to force it download rather than running it directly over the network. Some applications require write access to some of the installation files, which means you they will fail when running over the network since they won't be able to write in the package folder (nor should they, for obvious reasons).
mikedisd2
Cool, thanks for the responses. I haven't been able to try it yet but I'm gonna use Zartanasaurus' command line. Will let you know.
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of
INFOSEC Boot Camps
$250
OFF
Use code
EOY2025
to receive $250 off your 2025 certification boot camp!
BROWSE BOOT CAMPS