Options

SCCM package deploying problem

mikedisd2mikedisd2 Member Posts: 1,096 ■■■■■□□□□□
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:programvariables 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.

Comments

  • Options
    ZartanasaurusZartanasaurus Member Posts: 2,008 ■■■■■■■■■□
    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.
    Currently reading:
    IPSec VPN Design 44%
    Mastering VMWare vSphere 5​ 42.8%
  • Options
    CodeBloxCodeBlox Member Posts: 1,363 ■■■■□□□□□□
    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.
    Currently reading: Network Warrior, Unix Network Programming by Richard Stevens
  • Options
    ptilsenptilsen Member Posts: 2,835 ■■■■■■■■■■
    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).
    Working B.S., Computer Science
    Complete: 55/120 credits SPAN 201, LIT 100, ETHS 200, AP Lang, MATH 120, WRIT 231, ICS 140, MATH 215, ECON 202, ECON 201, ICS 141, MATH 210, LING 111, ICS 240
    In progress: CLEP US GOV,
    Next up: MATH 211, ECON 352, ICS 340
  • Options
    mikedisd2mikedisd2 Member Posts: 1,096 ■■■■■□□□□□
    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.
Sign In or Register to comment.