Issues with exit codes and SCCM

At least I think it’s an issue with exit codes. I’m trying to deploy Citrix Receiver (v. 4.9.6001) with PSADT (v. 3.6.9) through SCCM. On the client machines Receiver installs and works fine, and after installation PSADT gives the pop up that it has installed fine. However right after that the SCCM popup says the installation has failed and shows the same in software center. Obviously I can’t let Software Center think it’s not installed as that will mess up management and reporting, and I don’t want to just force it to pass a success code in case something does go wrong with the installation. I’m comfortable with PS, but far from an expert. Most scripts I’ve dealt with have been smaller in scope and I typically wrote them myself so I had a better understanding of how they worked. If anyone could point me in the direction I should be looking I’d appreciate it.

If a deployment was successful or failed in SCCM is not only based on exit code but also on detection rule of the deployment type. First you should have a look for the exit code that was provided to SCCM that can be found in appenforce.log. If this exit code fits one of the success exit codes configured in deployment type, then go ahead look for the detection rule. Maybe this condition is not true directly after installation f.e in case it is true after reboot. Then the deployment will be shown as installed after reboot and next evaluation cycle.