SCCM’07 – OSD – Task Sequence – Install Software not caching program to hard drive

sccm

I am running SCCM '07 and building a Windows 7 x86 image using OSD and a Task Sequence. During the TS I do an "Install Software" step to install Adobe Flash. The program for flash is a batch file using relative paths (no hardcoded paths. I am assuming that the program will be run from the cache and use the cached folder for the path). The program works just fine when I advertise it to a machine, but when it's run from the TS in the OSD it defaults the path to C:\Windows (most likely because it's trying to use a UNC path). I do a search on the hard drive and it doesn't appear that the progrm was cached at all. Any suggestions on what I'm missing or what I can do to set the path to be used for the program or, even better, to cache the program so it runs locally? Thanks for your time.

Best Answer

How are you running the batch file? Is it an "Install Software" step using an SCCM package, or is it a "Run Command Line" step? This makes a big difference to how you use and control batch files.

If you're using an "Install Software" step then all you should need to do is make sure you've got the Source location specified properly in the Package properties, and that you've got the command line right in the Program (along with leaving the "Start In:" box blank) and as always make sure the "Allow this program to be installed from the Install Software task sequence..." box is ticked.

If you're using a "Run Command Line" job, then after checking the same as above for its package, make sure that you've ticked the "Package" box in the step's properties, have specified the correct package that contains the files, and haven't specified anything in the "Start In" box.

Presume that the package is correctly out on the distribution points, else the Task Sequence should fail at the initial "Checking dependencies" step, but just in case you can run the SCCM report "Packages referenced by a specific task sequence" (in the Task Sequence - References" category) to check the distribution status of all the packages used by your TS.

Finally the SMSTS.log on the client machine should show the exact command lines being run at each step, where the files have been downloaded to (if at all) and what the current working directory is at the time the command is run. It's a huge file, and a pain to go through but does give you all the info. If you're using a batch file, you can also ECHO any useful info and it should show up in that log too. On a machine that's successfully run the entire build process the log will end up in either "C:\Windows\System32\CCM\Logs" or "C:\Windows\SysWOW64\CCM\Logs" depending on how much info has been logged you may find that the early steps of the task sequence have been archived in a smsts-date- time.log file.

If you don't have it already, then trace32.exe from the SCCM 2007 Toolkit is highly recommended to take some of the pain out of reading SCCM's logs. It's a tiny little log viewer app that understands SCCM's log format and highlights lines with potential errors or warnings.