' This Script fixes the Windows XP slow boot bug which is caused by the "Microsoft .NET Framework NGEN v4.0.30319" Service.
' This Script will checks if the "Microsoft .NET Framework NGEN v4.0.30319" Service is "Running" and if it is then the Script will try to set the "Startup type" for this Service to "Disabled".
' Disabling the "Microsoft .NET Framework NGEN v4.0.30319" Service will not cause any problems with programs that are run on with Microsoft .NET Framework v4.

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colServiceList = objWMIService.ExecQuery _
    ("Select * from Win32_Service where Name = 'clr_optimization_v4.0.30319_32'")

For Each objService in colServiceList
    If objService.State = "Running" Then
        errReturnCode = objService.ChangeStartMode("Disabled")
    End If
Next
