A recent e-mail thread on the MSSMS mailing list talked about why the SMS 2003 advanced client seems to behave differently sometimes, retrying advertisements where the program previously failed with certain return codes, i.e. return code 4. This is directly related to the policy settings retrieved from the management point, documented on MSDN via http://msdn.microsoft.com/library/default.asp?url=/library/en-us/smssdk03/hh/sms/smsref30_0121.asp and stored in WMI. You can find these values in WMI by looking at the CCM_SoftwareDistributionClientConfig instance located in the root\ccm\policy\machine\actualconfig namespace.
In this CCM_SoftwareDistributionClientConfig instance, there are three settings related to the automatic retry capability built into the advanced client:
- ExecutionFailureRetryErrorCodes - a list of return codes that should result in a retry.
- ExecutionFailureRetryCount - the maximum number of retries.
- ExecutionFailureRetryInterval - the number of seconds between retries.
By default, the list of retryable return codes is:
4,5,8,13,14,39,51,53,54,55,59,64,65,67,70,71,85,86,87,112,128,170,267,999,1003,1203,1219,1220,1222,1231,1232,1238,1265,1311,1323,1326,1330,1618,1622,2250
The default retry count is 1008; the default retry interval is 600 seconds (10 minutes). So what does that mean? Well, if the program run by the advertisement sets a return code in the list above, SMS will automatically try to run the advertisement again 10 minutes later; it will keep trying for many hours. So, it would be best to avoid generating any of these return codes if you don't want this retry to occur, especially if this return code is consistently returned: each execution generates status messages, network traffic, etc., best avoided if not needed or desired.
The CCM_SoftwareDistributionClientConfig instance also contains a list of return codes that indicate the need for a reboot. This property, RebootReturnCodes, contains these values by default:
1604,1641,3010,3011
So if a program returns any of these return codes, the advertisement will be considered successful, with the SMS client realizing that a restart is needed.
A third property on this class, LogoffReturnCodes, would enable SMS to automatically log off the current user based on the return code from the advertisement, but this property is not populated by default.
The lists of values in these properties, as reported in policy retrieved from the SMS management point, are obtained from the SMS site control file, although there is no supported way to modify these lists for all clients. Contact Microsoft Support if you have any questions about this.