SCCM/MECM Custom Return Codes on Deployment Type not working.

JMB 26 Reputation points
2023-01-31T07:35:33.75+00:00

I have the the following question (SCCM/MECM version 2207).

I know that the application setup will return an exitcode 4 (fail) if the license server is not reachable during install time. Nothing we can do about it, it's vendor default (Comsol 6.1).

What we can do is give feedback to the user and feedback in the log files about that exitcode 4.

So I added this return code 4 to the "Return Codes" tab of the deployment type:

User's image

But the Appenforce.log keeps telling me the exit code 4 is unmatched.

User's image

Also there is no feedback for the user from Software Center:

User's image

What am I missing here?

We have also played with this setting in the user experience tab:

User's image

I am using the correct revision, issue persists on multiple workstations.

Microsoft Configuration Manager
0 comments No comments
{count} votes

7 answers

Sort by: Most helpful
  1. AllenLiu-MSFT 40,316 Reputation points Microsoft Vendor
    2023-01-31T09:04:46.2033333+00:00

    Hi, @JMB

    Thank you for posting in Microsoft Q&A forum.

    If I understand correctly, you added the return code 4 to the "Return Codes" tab after you deployed the application.

    So it seems the clients do not recieve your change, you may try the steps:

    1. Remove the deployment of the application.
    2. Wait for an hour, the application will remove from the software center automatically.
    3. Re-deploy the application.

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Add comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. JMB 26 Reputation points
    2023-01-31T10:12:56.6066667+00:00

    Hi @AllenLiu-MSFT

    I have done exactly what you asked, I've removed the deployment. Waited until the Application was no longer in Software Center, Deployed again and tested.

    Same issue:

    User's image

    Easy to reproduce. If you deploy an application with an install.cmd with the contents "exit /b 4".

    This will force an exitcode of 4.

    Note, of course you have to add the Value to the Return Codes table on the deployment type:

    User's image

    0 comments No comments

  3. JMB 26 Reputation points
    2023-01-31T10:39:42.2833333+00:00

    @AllenLiu-MSFT

    I have isolated the problem, in this case I used en exitcode of 5.

    Just a install.cmd with:

    exit /b 5
    

    Same issue:

    User's image

    User's image

    AppEnforce.log:

    User's image

    0 comments No comments

  4. AllenLiu-MSFT 40,316 Reputation points Microsoft Vendor
    2023-02-01T08:53:21.7766667+00:00

    Hi, @JMB

    I test it in my lab, if I add a custom return code 6 Failure(no reboot), I get the same result as you, but if I add a custom return code 5 Success(no reboot), it matched the exit code 5. It's really strange, I will do more research about it, if there any progress, I will update it here.

    1

    2


  5. JMB 26 Reputation points
    2023-02-06T07:22:06.2733333+00:00

    I will raise an support call with Microsoft.