This project is read-only.

Deferral Detected as Success (Exit Code 0) by SCCM execmgr.log

Topics: Archive - Deployment Scripts, Archive - General
Mar 3, 2015 at 7:33 PM
Environment: SCCM 2012 R2 CU1
Model: Package Model
Command line: Deploy-Application.EXE
Toolkit version: 3.5.0
Rerun behavior: Rerun if failed previous attempt
Deployment configuration: Required with recurrence every 30 minutes.

Toolkit installation welcome: Show-InstallationWelcome -CloseApps 'wsImporter' -AllowDefer -DeferTimes 3 -CheckDiskSpace -PersistPrompt

Problem: The toolkit writes the correct exit code (5000) to the log, but execmgr.log reports an exit code 0 whenever a deferral takes place. Software Center then displays an "Installed" status, and the deployment never retries according to the recurrence schedule.

I've attempted to use other exit codes to test, such as 1, 1618, etc. The toolkit log always shows the code that is configured in AppDeployToolkitConfig.xml, but execmgr.log always displays exit code 0.

I've attempted to search around previous discussions, but I cannot seem to find anyone seeing this same behavior, nor have I found any potential fixes. If anyone can point me in the right direction, I would appreciate it.

Mar 4, 2015 at 10:35 PM
I commented on this issue when it was the opposite case in an earlier version (I assume, Ive been offline a while) :
I thought it was correct and expected at the time, but others thought it was a bug, so they 'fixed' it.
You may want to raise this as an issue to allow the contributors to weight in.
Mar 5, 2015 at 1:51 PM
Edited Mar 5, 2015 at 1:56 PM
Thanks for the info! I'm not sure how I missed that post. I'll have to give that updated Deploy-Application.EXE a shot as is mentioned and see what results I get. I was thinking that it should return an error too, so it at least knew to try again. We'll see how it goes. I'll report back.

I was under a bit of a time-crunch, so I worked around the issue by first making the deployment available and then required 90 minutes later with a 30 minute countdown if any detected apps are running. My client's preference is to use the deferral option normally.