Monday, August 27, 2012

Re-create BITS and Windows Update Services for Windows 7

So, you had a bit of nasty malware.  You're almost back to square one, but have now found yourself in the unfortunate position of having missing services--specifically the Background Intelligent Transfer Service and Windows Update services.

Never fear.  These, too, can be recreated in the event that your System Restore points are borked.  Copy/paste the commands into an elevated command prompt.

REM Recreate Windows Update / BITS Services for Windows 7
sc create BITS DisplayName= "Background Intelligent Transfer Service" binpath= "c:\windows\system32\svchost.exe -k netsvcs" Start= delayed-auto depend= EventSystem/RpcSs
sc create wuauserv DisplayName= "Windows Update" binpath= "c:\windows\system32\svchost.exe -k netsvcs" Start= delayed-auto depend= RpcSs

9 comments:

  1. Hello there, thanks for the advice, i'm struggling exactly with this problem at the moment.

    However, when I try to run these commands I get this error in both cases:

    [SC] CreateService FAILED 5:

    Access is denied.


    If you have any thoughts on this, It'll be greatly appreciated, thanks.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. To run an elevated command prompt:

    1. Click Start, type CMD
    2. In the start menu, you'll see cmd.exe appear under "Programs." Right click it and then "Run As Administrator."

    ReplyDelete
  4. Thanks aaron,

    after a couple of hours I finally got most of it working again!

    Cheers

    ReplyDelete
  5. Hi

    I too have had the same error message as above:

    [SC] CreateService FAILED 5:

    Access is denied.

    Running cmd.exe as an administrator does not solve the problem. I get the same message.

    I have ensured the administrator's security permissions grant "full control" to the cmd.exe (via properties)

    Can you advise my next step?

    Many thanks in advance

    ReplyDelete
  6. I LOVE YOU FOR THIS. No idea how i got infected, thou.

    ReplyDelete
  7. Hi,

    If you would like to correctly (re)create "Windows Update Service", you could try to execute these command lines as an administrator user :

    sc create wuauserv DisplayName= "Windows Update" binpath= "c:\windows\system32\svchost.exe -k netsvcs" Start= delayed-auto depend= RpcSs
    regsvr32 wuapi.dll
    regsvr32 wuaueng.dll
    regsvr32 wups.dll
    regsvr32 wups2.dll
    regsvr32 wuwebv.dll
    regsvr32 wucltux.dll


    Thanks you for your help, and these instructions works for me !

    ReplyDelete
  8. Perfect!
    Worked for me :)
    You rock mate, thanks a lot.

    ReplyDelete
  9. i have tried a lot of ways, but no luck. This is the first issue which makes me to find the solution for more than 24 hours. Please help me..

    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=
    C:\Windows\system32>sc create wuauserv DisplayName= "Windows Update" binpath= "c
    :\windows\system32\svchost.exe -k netsvcs" Start= delayed-auto depend= RpcSs
    [SC] CreateService FAILED 5:

    Access is denied.
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++

    ReplyDelete