Script in Package runs locally, but not deployed

So I am in the process of attempting to get a slightly older piece of software pushed out to my test environment. The software has prerequisites, an installer, and then a patch. I created a batch file script that runs perfectly fine when run directly on the PC. However, when I try to deploy it and run it, its failing.

So my questions are these. Is it wise to script something like this out? Or is it best practice to make each component its own package/app?

Also, any thoughts as to why it might fail thru SCCM but not locally?

I am relatively new to SCCM. We just put this server up and have been working in it since mid July. Were making pretty good progress with lots of apps, but this one has been relatively tricky.

Script Text:

@ECHO OFF

color 57

TITLE Workshare (Deltaview)

cls

:PreRequisites

ECHO Registry

Regedit /s "%~dp0WorkshareInstall.reg"

ECHO KB908002

msiexec.exe /i "%~dp0Extracted\WorksharePdfConverter.msi" /qn

ECHO VC++ x64 ATL Security Update

msiexec.exe /i "%~dp0Extracted\WorksharePdfConverter.msi" /qn

ECHO PDF Converter

msiexec.exe /i "%~dp0Extracted\WorksharePdfConverter.msi" /q

:Workshare

ECHO Workshare

msiexec.exe /i "%~dp0Extracted\Professional.msi" REINSTALL=ALL ALLUSERS=1 LICFILE="%~dp0workshare.lic" INSTALL_DVSHORTCUT=ON INSTALL_COMPARE=ON INSTALL_PROTECT=OFF INSTALL_REVIEW=OFF INSTALL_INTERWOVEN=ON /quiet /norestart

:Patches

ECHO Patches

"%~dp0PointRelease\Workshare523-PointRelease3.msp" /quiet /norestart

PAUSE

:END

EXIT

August 20th, 2013 8:06am

Why is it failing? The script does look ok at first sight.
Free Windows Admin Tool Kit Click here and download it now
August 20th, 2013 8:17am

Hi Brian,

Could be a few things in my experience.

1. It may be 64 Bit redirection, if your deploying it as part of a Task Sequence run the script as a command line and check the box to disable 64bit redirection

2. If your running it from the Distribution Point it may be the security zone warning halting the script in the background. I generally use VBscript rather than batch files and place these lines at the beginning/end to overcome this:

Dim oEnv  : Set oEnv = objWSHShell.Environment("PROCESS")
'// Remove security check to allow to run from SCCM DP
oEnv("SEE_MASK_NOZONECHECKS") = 1

'// Run exe, etc... here

'// Resotre security check
oEnv.Remove("SEE_MASK_NOZONECHECKS")

3. To help debug you could always pipe out to a log file to see where it's halting/failing, just add the following line after each step (replacing xxx for each):

echo Step xxx : %errorlevel% >> C:\install.log

Hope this helps!

August 20th, 2013 10:50am

Embarrassingly enough, I think the entire issue was the PAUSE statement I put in to see what was happening.
I removed it, and it installed just fine.

The little things sometimes....

Thanks for the tips though...!

Free Windows Admin Tool Kit Click here and download it now
August 20th, 2013 11:41am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics