Fix SCCM CcmSetup is exiting with return code 7
So far I have dealt with numerous client agent installation issues. Some of them were simple and some of them were really tough to troubleshoot. I have always documented then under SCCM troubleshooting category. Thanks to log files that keep us helping every time. What log file to analyze when, comes with experience. Most of the time the SCCM client agent install fails due to issues local to client machine. In this post we will talk about client agent installation issue – CcmSetup is exiting with return code 7.
The user mentioned that SCCM agent is installing but not completely. The Configuration Manager client Actions tab showed only two cycles.
- Machine Policy Retrieval & Evaluation Cycle.
- User Policy Retrieval & Evaluation Cycle.
In one of my post, I covered in detail about Configuration Manager Client Actions. If you find only those two actions, you have to really dig the log files to see what’s happening. While it takes some time to see other action cycles, don’t panic if you initially see only those action cycles.
CcmSetup is exiting with return code 7
Checking the ccmsetup.log file revealed something important. At the end was the line CcmSetup is exiting with return code 7. I had not seen this return code 7 before. Also there is not much info about this on internet. However I found Jason had blogged about this issue. He also documented the SCCM client agent installation error codes. That was really helpful in understanding what the return code 7 meant.
StartServices. Starting services CcmStartService. Starts the ccmexec service. Successfully deleted the ccmsetup service Deleted file C:\Windows\ccmsetup\ccmsetup.xml Task 'Configuration Manager Client Upgrade Task' does not exist ccmsetup CcmSetup is exiting with return code 7 ccmsetup
Referring to the same post, return code 7 translates to reboot required. That was crazy to hear but why a reboot ?. In my opinion it could be a pending system reboot that was required. Or as Jason mentioned it could be .NET Framework installer that was requesting a reboot. Rebooting the client machine brought back all the missing action cycles. Finally the SCCM client agent was seen active in console.
Hello,
I have installed several times the SCCM Client 5.00.9040.1015 but each time the ccmsetup is ending with the message: “CcmSetup is exiting with return code 7”. The servers have been rebooted several times, still having the error… The servers have been patched and rebooted again and the agent is still not reporting to the console as described in your article only two items in the Client Action Tab : Machine Policy Retrieval & Evaluation Cycle.
User Policy Retrieval & Evaluation Cycle.
What else should be tried?
Thanks,
Dom
Your clients are not contacting the management point server after the ccmsetup installs. There could be many reasons for that and you must examine the client side log files.
We also face same kinds of issues in lots of systems. We are sharing you the log file details please suggest what step we are missing.
MSI: Action 17:27:48: CcmRegisterSystemTaskRollback. Rolls back the changes made by CcmRegisterSystemTask. 2/25/2021 5:27:48 PM 5936 (0x1730)
MSI: Action 17:27:48: CcmRegisterSystemTask. Registers a System Task with WMI. 2/25/2021 5:27:48 PM 5936 (0x1730)
MSI: Action 17:27:48: CcmRegisterHostingConfiguration. Register configuration for Configuration Manager Client service. 2/25/2021 5:27:48 PM 5936 (0x1730)
MSI: Action 17:27:49: CcmFixupServiceConfig. Sets the services or load ordering groups which must be started before ccmexec can be started. 2/25/2021 5:27:49 PM 5936 (0x1730)
MSI: Action 17:27:49: CcmSetObjectSecurity. Applying security permissions 2/25/2021 5:27:49 PM 5936 (0x1730)
MSI: Action 17:27:50: CcmSetupLogging. Sets component logging information in WMI. 2/25/2021 5:27:50 PM 5936 (0x1730)
MSI: Action 17:27:51: SmsSwDistSetCacheConfig. This custom action gets the cache configuration, disables the cache options in control panel if required by the site settings and updates the registry keys accordingly. It also configures the security for the cache directory. 2/25/2021 5:27:51 PM 5936 (0x1730)
MSI: Action 17:27:51: CcmRegisterPerfCountersRollback. Rolls back any changes made by CcmRegisterPerfCounters if install fails. 2/25/2021 5:27:51 PM 5936 (0x1730)
MSI: Action 17:27:51: CcmRegisterPerfCounters. Registers performance counters gathered in the CcmRegisterPerfCountersInit action 2/25/2021 5:27:51 PM 5936 (0x1730)
MSI: Action 17:27:51: CcmRegisterComponentsRollback. In the event of a failed installation, this action rolls back the changes from CcmRegisterComponents. 2/25/2021 5:27:51 PM 5936 (0x1730)
MSI: Action 17:27:51: CcmRegisterComponents. Registers components passed in from CcmRegisterComponentsInit 2/25/2021 5:27:51 PM 5936 (0x1730)
MSI: Action 17:27:51: CcmInstallUtil. Calling InstallUtil.exe to register .net WMI provider 2/25/2021 5:27:51 PM 5936 (0x1730)
MSI: Action 17:27:52: SmsSetLUAAccessPermissions. >Gets permission for elevation on Vista and grants each COM object permission. 2/25/2021 5:27:52 PM 5936 (0x1730)
MSI: Action 17:27:52: Ngen. Calling NGEN.exe 2/25/2021 5:27:52 PM 5936 (0x1730)
MSI: Action 17:27:53: InstallServices. Installing new services 2/25/2021 5:27:53 PM 5936 (0x1730)
MSI: Action 17:27:53: WriteEnvironmentStrings. Updating environment strings 2/25/2021 5:27:53 PM 5936 (0x1730)
MSI: Action 17:27:53: CcmSetServiceConfig. Sets WMI ServiceRootDir and configures CCMEXEC service. 2/25/2021 5:27:53 PM 5936 (0x1730)
MSI: Action 17:27:54: CcmRegisterWinTaskRollback. Rolls back the changes made by CcmRegisterWinTask. 2/25/2021 5:27:54 PM 5936 (0x1730)
MSI: Action 17:27:54: CcmRegisterWinTask. Registers tasks with Windows Task Scheduler. 2/25/2021 5:27:54 PM 5936 (0x1730)
MSI: Action 17:27:54: SmsMigrateInventory. Migrating SMS Legacy Client inventory settings 2/25/2021 5:27:54 PM 5936 (0x1730)
MSI: Action 17:27:54: CcmEnableAppVIntegration. Enable Configuration Manager Client integration with App-V. 2/25/2021 5:27:54 PM 5936 (0x1730)
MSI: Action 17:27:54: CcmConfigDCOM. Configures registry key permissions for the DCOM Components passed from CcmConfigDCOMInit. 2/25/2021 5:27:54 PM 5936 (0x1730)
MSI: Action 17:27:56: SmsShellNotify. Notifies the shell for the file-association icon changes. 2/25/2021 5:27:56 PM 5936 (0x1730)
MSI: Action 17:27:56: CcmRemoveObsoletedWinTask. Remove obsoleted Windows Task Scheduler tasks. 2/25/2021 5:27:56 PM 5936 (0x1730)
MSI: Action 17:27:56: SmsSetClientConfig. Applies the configuration placed by SmsSetClientConfigInit and configures client framework. 2/25/2021 5:27:56 PM 5936 (0x1730)
MSI: Action 17:27:56: CcmInitializePolicy. Sets and initializes default policy. 2/25/2021 5:27:56 PM 5936 (0x1730)
MSI: Action 17:28:02: CcmBootstrapSqlCEDatabases. Create Sql CE databases that were queued by CcmBootstrapSqlCEDatabasesInit. 2/25/2021 5:28:02 PM 5936 (0x1730)
MSI: Action 17:28:03: CcmBootstrapSqlCEDatabasesRollback. Rollback Sql CE databases that were queued by CcmBootstrapSqlCEDatabasesInit. 2/25/2021 5:28:03 PM 5936 (0x1730)
MSI: Action 17:28:03: CcmBootstrapSqlCEDatabasesCommit. Commit Sql CE databases that were queued by CcmBootstrapSqlCEDatabasesInit. 2/25/2021 5:28:03 PM 5936 (0x1730)
MSI: Action 17:28:03: CcmClearServiceSetupStamp. Clear the time stamp for blocking the ccmexec service from starting up during upgrade. 2/25/2021 5:28:03 PM 5936 (0x1730)
MSI: Action 17:28:04: CcmRegisterProduct. If product is registered in MSI database, then product is registered with WMI. 2/25/2021 5:28:04 PM 5936 (0x1730)
MSI: Action 17:28:04: SmsInstallPrepDrvr. Installing Software Metering PREP Driver 2/25/2021 5:28:04 PM 5936 (0x1730)
MSI: Action 17:28:04: StartServices. Starting services 2/25/2021 5:28:04 PM 5936 (0x1730)
MSI: Action 17:28:05: CcmStartService. Starts the ccmexec service. 2/25/2021 5:28:05 PM 5936 (0x1730)
MSI: Action 17:28:05: SmsCleanupDesktopMigrationInfo. Deletes backed up information on the disk. 2/25/2021 5:28:05 PM 5936 (0x1730)
MSI: Action 17:28:05: SmsRemoteControlRepairConfig. Repair may require to start Remote Control Service if Remote Control is enabled. 2/25/2021 5:28:05 PM 5936 (0x1730)
MSI: Action 17:28:05: CcmRollbackEvalTask. Rollback the creattion of Configuration Manager Client evaluation tasks. 2/25/2021 5:28:05 PM 5936 (0x1730)
MSI: Action 17:28:05: CcmCreateEvalTask. Create Configuration Manager Client evaluation tasks. 2/25/2021 5:28:05 PM 5936 (0x1730)
MSI: Action 17:28:06: RollbackCleanup. Removing backup files 2/25/2021 5:28:06 PM 5936 (0x1730)
MSI: Action 17:28:09: RemoveExistingProducts. Removing applications 2/25/2021 5:28:09 PM 5936 (0x1730)
File C:\WINDOWS\ccmsetup\{E6F27809-FF66-4BAA-B0FB-E4A154A6A388}\client.msi installation succeeded. 2/25/2021 5:28:09 PM 5936 (0x1730)
No client language or update changes are detected per current client.msi. 2/25/2021 5:28:09 PM 5936 (0x1730)
C:\WINDOWS\CCM\clientstate.dat exists after client.msi run. 2/25/2021 5:28:09 PM 5936 (0x1730)
Could not retrieve value for MDM_ConfigSetting . Error 0x80041010 2/25/2021 5:28:09 PM 5936 (0x1730)
Updating MDM_ConfigSetting.ClientHealthStatus with value 1 2/25/2021 5:28:09 PM 5936 (0x1730)
Failed to get MDM_ConfigSetting instance, 0x80041010 2/25/2021 5:28:09 PM 5936 (0x1730)
Sending state ‘400’… 2/25/2021 5:28:09 PM 5936 (0x1730)
Updating MDM_ConfigSetting.ClientDeploymentErrorCode with value 0 2/25/2021 5:28:09 PM 5936 (0x1730)
Failed to get MDM_ConfigSetting instance, 0x80041010 2/25/2021 5:28:09 PM 5936 (0x1730)
[5.00.8968.1042] Params to send ‘5.0.8968.1042 Deployment [SMB] C:\Client\’ 2/25/2021 5:28:09 PM 5936 (0x1730)
2/25/2021 5:28:09 PM 5936 (0x1730)
Raised pending client deployment state message. 2/25/2021 5:28:09 PM 5936 (0x1730)
Successfully deleted the ccmsetup service 2/25/2021 5:28:14 PM 5936 (0x1730)
Deleted file C:\WINDOWS\ccmsetup\ccmsetup.cab.download 2/25/2021 5:28:14 PM 1436 (0x059C)
Deleted file C:\WINDOWS\ccmsetup\ccmsetup.xml 2/25/2021 5:28:14 PM 1436 (0x059C)
Deleted file C:\WINDOWS\ccmsetup\cm2002-client-kb4560496-x64.msp.download 2/25/2021 5:28:14 PM 1436 (0x059C)
Task ‘Configuration Manager Client Upgrade Task’ does not exist 2/25/2021 5:28:14 PM 1436 (0x059C)
Could not retrieve value for MDM_ConfigSetting . Error 0x80041010 2/25/2021 5:28:14 PM 1436 (0x059C)
CcmSetup is exiting with return code 0 2/25/2021 5:28:14 PM 1436 (0x059C)
I have this same issue happening to me but on a task sequence that works fine if I do a manual PXE boot. If I try to PXE boot via WOL, after the OSD finishes and I log in to the machine, the CCM Notification agent is disabled and the ccmsetup.log gives a 7 error. So I add a restart step to the very last part of my tasks and the restart works but still get the same problem. Any ideas what I’m doing wrong?
Hi – I am seeing the same issue at one of our sites in OSD. Have you been able to resolve this issue?
If not, I think you’ll want to add the reboot directly after the sccm client installation step.
Still have the same issue. I do have a reboot directly after the client installation so I don’t know what’s going on.
same for me I never understand why the reboot is required but the message seems to be right in 99% of my troubleshooting cases
The reboot worked fine. Excellent post.
Cool..
All in doubt Reboot lol This worked for me. It also says it in the logs from the bottom 9 lines up. Click on that line and it will reference Windows Installer has requested a reboot
Hi Prajwal,
I happen to see this error and we can install the client without rebooting the server.
Just cleanup / delete all the files (if there any) in CCMSETUP folder, and we can keep logs folder for our reference.
Then the client installation will be successful. this is what I have observed. Hope this helps others too..
Cheers,
Aswani