Answered by:
"Failed to open service control manager" while sysprep install devices

Question
-
Hello,
I have random problems while sysprep install devices drivers, in setupapi.dev.log I sometime have this error on any device:
ndv: Installing device... dvi: {DIF_INSTALLDEVICE} 07:34:32.734 dvi: CoInstaller 1: Enter 07:34:32.734 dvi: CoInstaller 1: Exit dvi: Class installer: Enter 07:34:32.734 inf: Opened PNF: 'C:\Windows\INF\msmouse.inf' ([strings.040c]) dvi: {Install DEVICE} inf: Opened PNF: 'c:\windows\system32\driverstore\filerepository\msmouse.inf_amd64_neutral_7a5f47d3150cc0eb\msmouse.inf' ([strings.040c]) dvi: Processing Registry/Property directives... inf: {Install Inf Section [HID_Mouse_Inst.NT]} inf: {Install Inf Section [HID_Mouse_Inst.NT] exit (0x00000000)} inf: {Install Inf Section [HID_Mouse_Inst.NT.Hw]} inf: DelReg=HID_Mouse_Inst.DelReg.NT (msmouse.inf line 407) inf: AddReg=HID_Mouse_Inst.AddReg.NT (msmouse.inf line 406) inf: {Install Inf Section [HID_Mouse_Inst.NT.Hw] exit (0x00000000)} dvi: {Writing Device Properties} dvi: Provider name=Microsoft dvi: DriverDate 06/21/2006 dvi: DriverVersion=6.1.7600.16385 dvi: Class name=Mouse dvi: Manufacturer=Microsoft dvi: Matching DeviceID=hid_device_system_mouse dvi: Strong Name=msmouse.inf:MSMfg.NTamd64:HID_Mouse_Inst:6.1.7600.16385::hid_device_system_mouse dvi: {Writing Device Properties - Complete} inf: {Install Inf Section [HID_Mouse_Inst.NT.Services]} inf: AddService=mouhid,0x00000002,MouHid_Service_Inst,MouHid_EventLog_Inst (msmouse.inf line 428) inf: ServiceType=1 (msmouse.inf line 503) inf: StartType=3 (msmouse.inf line 504) inf: ErrorControl=0 (msmouse.inf line 505) inf: ServiceBinary=C:\Windows\system32\DRIVERS\mouhid.sys (msmouse.inf line 506) inf: DisplayName="Pilote HID de souris" (msmouse.inf line 502) inf: LoadOrderGroup="Pointer Port" (msmouse.inf line 507) !!! dvi: Add Service: Failed to open service control manager. !!! inf: {Install Inf Section [HID_Mouse_Inst.NT.Services] exit(0x0000045b)} !!! dvi: Error while installing services. !!! dvi: Cleaning up failed installation dvi: {Install DEVICE exit (0x0000045b)} !!! dvi: Cleaning up failed installation (0000045b) !!! dvi: Class installer: failed(0x0000045b)! dvi: CoInstaller 1: Enter (Post Processing) 07:34:32.781 dvi: CoInstaller 1: Exit (Post Processing) dvi: {DIF_INSTALLDEVICE - exit(0x0000045b)} 07:34:32.781 !!! ndv: Error(0000045b) installing device! ndv: Device install status=0x0000045b ndv: Performing device install final cleanup... ! ndv: Queueing up error report since device installation failed... ndv: {Core Device Install - exit(0x0000045b)} 07:34:32.796 dvi: {DIF_DESTROYPRIVATEDATA} 07:34:32.796 dvi: CoInstaller 1: Enter 07:34:32.796 dvi: CoInstaller 1: Exit dvi: Class installer: Enter 07:34:32.796 dvi: Class installer: Exit dvi: Default installer: Enter 07:34:32.796 dvi: Default installer: Exit dvi: {DIF_DESTROYPRIVATEDATA - exit(0xe000020e)} 07:34:32.796 ump: Server install process exited with code 0x0000045b 07:34:32.796 <<< Section end 2017/01/23 07:34:32.796 <<< [Exit status: FAILURE(0x0000045b)]
It does not happen all the time, sometime on some computers I have "Add Service: Modified existing service 'mouhid'." I've checked access right and owner of C:\Windows, C:\ProgramData and HKLM\SYSTEM\CurrentControlSet\Services but nothing seams wrong.
Any idea?
Monday, January 23, 2017 10:33 AM
Answers
-
It was FOGService the problem. I've disabled it before sysprep then activate it after and it work fine!
- Marked as answer by Nicolas Lenain Friday, February 3, 2017 7:03 AM
Friday, February 3, 2017 7:03 AM
All replies
-
Hi,
Based on your description, there is a thread may give you some ideas, please refer to the link:
Operations Manager Server failed to open service control manager on computer…
Best Regards,
Tao
Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
Tuesday, January 24, 2017 9:08 AM -
Hi Tao,
Thanks for your reply, I've checked your link but his issue is different. He got trouble to install SCOM agents via his domain.
My issue is driver installation while sysprep who fail because sometime it can't access to service control manager to create/edit driver service. I'm pretty sure it's a right access problem but I can't say how?
I'm trying with adding NT SERVICE\TrustedInstaller and System accounts to Administrators group. I'll tell you if it work better.
Tuesday, January 24, 2017 11:29 AM -
OK, we are looking forward to your good news:)
Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
Wednesday, January 25, 2017 1:03 AM -
It don't work better... I've find another solution on internet: set TrustedInstaller and Distributed Transaction Coordinator services to Auto start. I'm trying...
Monday, January 30, 2017 7:19 AM -
Good Luck :)
Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
Tuesday, January 31, 2017 1:44 AM -
I think that I've found my problem, I found that FOG (Free Open Ghost) change the machine name in the middle of sysprep. So maybe it occur right access problem? I've dis-activate this option.
Then I've found that FOGService change the computer name and execute shutdown -r while sysprep hardware installation... I have dis-activate the service and I'm testing now.
- Marked as answer by Nicolas Lenain Friday, February 3, 2017 7:02 AM
- Unmarked as answer by Nicolas Lenain Friday, February 3, 2017 7:03 AM
Wednesday, February 1, 2017 9:39 AM -
It was FOGService the problem. I've disabled it before sysprep then activate it after and it work fine!
- Marked as answer by Nicolas Lenain Friday, February 3, 2017 7:03 AM
Friday, February 3, 2017 7:03 AM