none
Client and WMI repairs--any automation possible?

    Question

  • We seem to have lots of clients with WMI problems, causing most of the client problems we have.  And, we have some client problems.  I've use Zander's Client Center to do some successful WMI repairs, and, have played around with running WMIDiag, which mainly tells me I have problems (which I knew), and, reinstalling .Net 3.5SP1 and hotfixes, which has fixed some.  But, don't have staff or time to manually fix things, and, can't just replace/reclone all my computers with problems.  Searching Google, not a lot of help out there...

    What can be done to automatically detect and fix client and WMI problems?  Running SCCM R2.

    Thanks!
    Thursday, July 30, 2009 11:40 AM

Answers

  • See http://social.technet.microsoft.com/Forums/en-US/configmgrsetup/thread/0fdb7ef2-25c9-4b96-bda0-927cc0ae280a.
    Just as a side note: ConfigMgr just uses WMI as an underlying technology, so this question would fit better in an OS related forum/newsgroup.
    • Marked as answer by Yog Li Wednesday, August 26, 2009 6:52 AM
    Thursday, July 30, 2009 11:42 AM
    Moderator
  • ***Because of the limitation of the body, I posted my suggestion in the two posts. ***
    I am a beginner in SCCM troubleshooting problems. In the last month I have a lot of problems with the CCMSetup, SCCM Reports, SCCM Deployments, etc.

    The root cause of this problem was the WMI repository.

    I had 100 machines in my domain that the CCM Client is not working property, SCCM packages fail, inventory software and hardware fail, etc

    After executing the process describes bellow, the actual number of the machines problem is 0.

    So, the question is:

    How correct the WMI Repository in large scale and remotely?

     

    I created some stuffs...

     

    1 - Pre-requisites:

     1.1 - Download the PSEXEC in http://technet.microsoft.com/en-us/sysinternals/default.aspx and copy the program for the c:\windows\system32.

    The sysinternals tools is awesome !.

     1.2 - Create one directory in network share (allow access “read and execute” to Domain Users in your domain) called CCMREPAIR. Inside the CCMREPAIR directory, you must create the 2 subdirectories. One subdirectory called LOG and other subdirectory called SCRIPT.

     1.3 - Download the Kixtart 2010 4.51 (kix32.exe) in http://www.kixtart.org/. Extract the file kix32.exe and copy to CCMREPAIR\SCRIPT\ Directory.

     1.4 - Open the notepad and write the command line bellow:

    “c:\windows\ccmrepair\kix32.exe c:\windows\ccmrepair\ccmrepair.kix”

    Salve the document in CCMREPAIR\SCRIPT\ directory with the name of “init.cmd”

     

     1.5 – Copy the CCMSetup.exe to CCMREPAIR\SCRIPT\ directory in your network.

     1.6 – Create in your machine one file called C:\machines.txt.

     In the c:\machines.txt file, you write all the NETBIOS machine name targets, without blank spaces,

    See the format of the machines.txt file:

    Br506abc

    Br506ade

    Br506erf

    ***You must executed the CCMREPAIR.VBS (Vbscript Language, item 2) in the same machine where you created the c:\machines.txt and put the PSEXEC.***

     

    1 – Fix script - CCMRepair.kix

    I love the script languages. The Kixtart is very powerfull script language and could be running without System Operation dependencies.

    Then, if the WMI or others functions in Windows Operation System not is trustable, run scripts in Kixtart language is a good choice to fix the problems.

    Copy the Kixtart Code in notepad and salve in CCMREPAIR\SCRIPT\ directory with the name of CCMRepair.kix.

    ATTENTION – You must change the values of the items bellows, to adequate the script for your environment.

    $Server = \\Myserver\Mysare$\CCMREPAIR\LOG\

     

    shell "%comspec% /c c:\windows\ccmrepair\ccmsetup.exe /noservice SMSSLP=SCCMSERVER SMSSITECODE=AUTO SMSCACHESIZE=2048"

     

    Kixtart Code:

    ;*******************************************************************

    ;**CCMRepair.kix

    ;**KiXtart SCCM Client Repair

    ;**Created: 02-JUL-2009

    ;**Last Modified:09-JUL-2009

    ;**Leandro A. Farom (leandrofarom@hotmail.com)

    ;*******************************************************************

    ;=================================================

    ;Set Options, Declare Variables and other things..

    ;Hide the console during the executing. If you not comment this line, the execution in visible in prompt.

    ;================================================

    ;$ = SetConsole("Hide")

    Global $Computer

    Global $WMI,$Nul,$TheService,$Service,$ServiceName,$ServiceDisplayName,$ServiceState,$Start,$Stop,$Process,$Processes

    Global $FindActiveProcess

    Global $KillActiveProcess

    Global $ServiceShutDownError

    Global $ServiceStartupError

    Global $log,$W,$Server,$Computer,$Reboot,$CCMInstall

    ;=================================================

    ;The variable receives the Computer name

    ;=================================================

    $Computer = @WKSTA

    ;=================================================

    ;Local for output log

    ;=================================================

    $Server = "\\Myserver\Mysare$\log\"

    $log = ($Server+$Computer+"_" + SubStr (@DATE,1,4) + SubStr(@DATE,6,2)+ SubStr (@DATE,9,2) + ".log")

    ;=================================================

    ;Set the variable to check if the path exist. Use in the final of the script

    ;=================================================

    $CCMInstall = "C:\Windows\System32\CCM"

    ;=================================================

    ;Verify if the log file exist

    ;=================================================

    if exist ($log)

    shell "%comspec% /c del /S /Q "+$log

    endif

    if not exist ($log)

    Open(3,$log,5) = 0

    ;=================================================

    ;I Write the log after each action. It is not the better way, but is functionally. I wrote the hour and minute of the each action

    ;=================================================

    $w=WriteLine(3, "========================= "+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Execution Begin - " + @date +" "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "Correct the CCM Client - CCMRepair.kix"+ Chr(13) + Chr(10))

    $w=WriteLine(3, "========================"+ Chr(13) + Chr(10))

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    $w=WriteLine(3, "========================="+ Chr(13) + Chr(10))

    ;=================================================

    ;Verify the services, services depended and take actions.

    ;=================================================

    $w=WriteLine(3, "Verify the services and take actions as need - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "=========================="+ Chr(13) + Chr(10))

    ;=================================================

    ;If the CCM Client try to install, kill the process

    ;=================================================

    $ProcessName = "CCMSETUP.EXE"

    $w=WriteLine(3, "Terminate the process $ProcessName - "+ @time + Chr(13) + Chr(10))

    ;If ($KillActiveProcess = "Process Terminated") Or ($KillActiveProcess = "Process NOT Terminated")

    ;$KillActiveProcess = "Process doesn’t exist"

    ;endif

    If ($KillActiveProcess = "")

    $KillActiveProcess = "Process DOESN’T exist or NOT this active"

    else

    $Nul = $KillActiveProcess($ProcessName)

    endif

    sleep 20

    $w=WriteLine(3, "$KillActiveProcess "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;=================================================

    ;Stop the CCMEXEC Service

    ;=================================================

    $ServiceName = "CCMEXEC"

    $w=WriteLine(3, "Stopping the service $ServiceName - "+ @time + Chr(13) + Chr(10))

    $Nul = StopService($ServiceName)

    sleep 20

    $w=WriteLine(3, "$WriteServiceStopError "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;=================================================

    ;Stop the BITS Service

    ;=================================================

    $ServiceName = "BITS"

    $w=WriteLine(3, "Parando serviço $ServiceName - "+ @time + Chr(13) + Chr(10))

    $Nul = StopService($ServiceName)

    sleep 20

    $w=WriteLine(3, "$WriteServiceStopError "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;=================================================

    ;Stop the WINMGMT

    ;=================================================

    $ServiceName = "WINMGMT"

    $w=WriteLine(3, "Parando serviço $ServiceName - "+ @time + Chr(13) + Chr(10))

    $Nul = StopService($ServiceName)

    sleep 20       

    $w=WriteLine(3, "$WriteServiceStopError "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Remove The WBEM Repository

    ;========================================

    $w=WriteLine(3, "========================+"+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Remove the WBEM Repository - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "========================="+ Chr(13) + Chr(10))

    go c:

    cd "%windir%\system32\wbem"

    $w=WriteLine(3, "Delete the files in WBEM Repository - "+ @time + Chr(13) + Chr(10))

    shell "%comspec% /c del /S /Q repository\*.* "

    $w=WriteLine(3, "Delete the WBEM Repository - "+ @time + Chr(13) + Chr(10))

    shell "%comspec% /c rd /S /Q repository "

    $w=WriteLine(3, "========================="+ Chr(13) + Chr(10))

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Start the WMI Service (Winmgmt)

    ;========================================

    $w=WriteLine(3, "========================="+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Start the Winmgmt services - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "========================"+ Chr(13) + Chr(10))

    $ServiceName = "winmgmt"

    $Nul = StartService ($ServiceName)

    sleep 20

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Re-register DLL e compile the o .MOF

    ;========================================

    $w=WriteLine(3, "========================="+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Re-registra DLL e compila o .MOF  - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "========================="+ Chr(13) + Chr(10))

    Shell "%comspec% /c for /f %%s in ('dir /b *.dll') do regsvr32 /s %%s"

    Shell "%comspec% /c for /f %%s in ('dir /b *.mof *.mfl') do mofcomp %%s"

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Re-register DLL and compila o .MOF inside CCM Directory

    ;========================================

    $w=WriteLine(3, "======================"+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Re-registra DLL e compila o .MOF CCM - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "======================"+ Chr(13) + Chr(10))

    go c:

    cd $CCMInstall

    shell "%comspec% /c for /f %%s in ('dir /b *.dll') do regsvr32 /s %%s"

    shell "%comspec% /c for /f %%s in ('dir /b *.mof *.mfl') do mofcomp %%s"

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Uninstall CCM Client

    ;========================================

    $w=WriteLine(3, "====================="+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Uninstall the CCM Client  - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "====================="+ Chr(13) + Chr(10))

    go c:

    shell "%comspec% /c c:\windows\ccmrepair\ccmsetup.exe /uninstall"

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Remove CCM and CCMSetup directory

    ;========================================

    $w=WriteLine(3, "========================"+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Remove os diretórios CCM e CCMSetup - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "======================"+ Chr(13) + Chr(10))

    go c:

    cd "%windir%\system32\"

    shell "%comspec% /c del /S /Q ccmsetup\*.*"

    shell "%comspec% /c rd /S /Q ccmsetup"

    shell "%comspec% /c del /S /Q ccm\*.*"

    shell "%comspec% /c rd /S /Q ccm"

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Start BITS Service

    ;========================================

    $w=WriteLine(3, "==========================="+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Inicializa o servico BITS - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "========================"+ Chr(13) + Chr(10))

    $ServiceName = "BITS"

    $Nul = StartService ($ServiceName)

    sleep 20

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Install the CCM Client with the CCMSetup.exe

    ; To install I used the advanced options.

    ;/noservice =

    ;/SMSSLP =

    ;/SMSSITECODE=

    ;/SMSCACHESIZE=2048

    ;========================================

    $w=WriteLine(3, "==================="+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Instala CCM Client - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "==================="+ Chr(13) + Chr(10))

    go c:

    sleep 120

    shell "%comspec% /c c:\windows\ccmrepair\ccmsetup.exe /noservice SMSSLP=SCCMSERVER SMSSITECODE=AUTO SMSCACHESIZE=2048"

    ;========================================

    ; Verify If restart the machine is necessary to complete the CCMSetup installation.

    ; Some times, to proceed with the CCMSetup installation, the operation system must ;be restarted. The BITS service waits the restarted machine to proceed with the ;download of the Client.msi and then finish the CCM Client install.

    ;The script DOESN’T force the machine restart.

    ;========================================

    if not exist ($CCMInstall)

    $Reboot = "It’s necessary restart the machine to complete the installation process - BITS Schedule"

    else

    $Reboot = "CCM Client Successful installation"

    endif

    $w=WriteLine(3, "$Reboot "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Finish the script execution

    ;========================================

    $w=WriteLine(3, "======================"+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Finish  Log - " + @date +" "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "================="+ Chr(13) + Chr(10))

    $ = Close (3)

    Exit

    ;=========================================

    ;SubFunctions, Functions and Routines

    ;=========================================

    ;=========================================

    ;Find the process

    ;=========================================

    Function FindActiveProcess($ProcessName)

       $FindActiveProcess = "Process Not Found"

       $Processes = GetObject("winmgmts://" + $Computer).InstancesOf("win32_process")

       For Each $Process in $Processes

          If $Process.Name = $ProcessName

             $FindActiveProcess = "Process Running"

          EndIf

       Next

    EndFunction

     ***Continue in the next post***

    • Edited by Leandro Farom Friday, July 31, 2009 12:59 AM
    • Marked as answer by Yog Li Wednesday, August 26, 2009 6:52 AM
    Thursday, July 30, 2009 11:37 PM
  • ;========================================

    ;Kill the Process

    ;========================================

    Function KillActiveProcess($ProcessName)

       $KillActiveProcess = "Process Not Found"

       $Processes = GetObject("winmgmts://" + $Computer).InstancesOf("win32_process")

       For Each $Process in $Processes

          If $Process.Name = $ProcessName

             $Nul = $Process.Terminate

          EndIf

       Next

       Sleep 1

       $Nul = FindActiveProcess($ProcessName)

       If $FindActiveProcess = "Process Running"

          $KillActiveProcess = "Process Terminated"

       Else

          $KillActiveProcess = "Process NOT Terminated"

       EndIf

    EndFunction

    ;========================================

    ;Stop the service

    ;========================================

    Function StopService ($ServiceName)

       $ServiceShutDownError = 0

       $WMI = GetObject("winmgmts:\\" + $Computer)

       If $WMI = 0

          $ServiceShutDownError = 1;

       Else

          $TheService = $WMI.Get("Win32_Service.Name='$ServiceName'")

          If $TheService = 0

          Else

             $Service = GetObject("winmgmts:Win32_Service.Name='$ServiceName'")

             $Nul = $Service.SetInfo

             $ServiceDisplayName = $Service.DisplayName

             $ServiceState = $Service.State

             If Not $ServiceState = "STOPPED"

                $Stop = $Service.StopService()

                $Nul = $Service.SetInfo

                If $Stop = 0

                   $ServiceStopError = 0

                                    $WriteServiceStopError = "The service successfully stopped"

                Else

                   $ServiceStopError = 1

                                    $WriteServiceStopError = "The service DOESN’T successfully stopped (The service could be not active)"

                                 Endif  

             EndIf

          EndIf

       EndIf

    EndFunction


    2 – Deployment Script – CCMRepair.vbs

    Now, it’s necessary copy and executes the files, include the CCMRepair.kix, to the machines where CCM Client show problems.

    Here is a little script in VBScript language to deployment the files in multiple machines and treatment the RPC errors.

    All the output is send for the MS-PROMPT.

    ATTENTION – You must change the values of the items bellows, to adequate the script for your environment.

     

    Admin = "mydomain\userid"

    Pwd = "password"

    *** The credentials informed they must be rights of the administrator in machine target***

     

    oShell.Run ("cmd /c psexec \\"&strcomputer&" -u "&Admin&" -p "&Pwd&" cmd /c xcopy /y /z "&chr(34)&"\\MyServer\Myshare\ccmrepair\script\*.*"&chr(34)&" "&chr(34)&"\\"&strcomputer&"\admin$\ccmrepair\"&chr(34)),1,true

     

      

    VBscript Code:

    On Error Resume Next

    Const ForAppending = 8

    '========================================

    'Credentials to access the machines

    '========================================

    Admin = "mydomain\userid"

    Pwd = "password"

    '========================================

    'Kill the MS-Prompt

    '========================================

    Fim = "Exit"

    '========================================

    'Object to access the machines

    '========================================

    Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")

    '========================================

    'Open the c:\machine.txt and read the

    'machine names

    '========================================

    Set ofs = createobject("scripting.filesystemobject")

    StrList = "C:\Machines.txt"

    set oipFile = ofs.opentextfile(StrList, 1, false)

    '========================================

    'Shell Objects

    '========================================

    Set oShell = wscript.CreateObject("wscript.Shell")

    Set wShell = CreateObject("Wscript.Shell")

    '========================================

    'Create a log file connection

    'If the machine cannot connected, write the

    'machine name in this log file

    '========================================

    Set olog = createobject("scripting.filesystemobject")

    Set ologCreate = olog.CreateTextFile("C:\ConnFailed.log")

    ologCreate.Close

    set ologFile = olog.OpenTextFile("c:\ConnFailed.log", ForAppending)

    '========================================

    'Verify the error when try access

    'the c:\machines.txt file.

    'If the file DOESN'T exist, finish the script execution

    'else read line by line the file.

    'Note: The c:\machines.txt must contain the NETBIOS name of

    'the machine, without blank spaces

     ''Example:

     ''BR234LE

     ''BR655TE

     ''BR90FG

     '========================================

              if (Err.Number <> 0) then

                       Strmsg=MsgBox("The file "&strlist&" DOESN'T exist",0,"Close the script")

                       Set objWsh = oShell.Exec(fim)    

                                 else

                                 while not oipFile.atEndOfStream

                                 strComputer = oipFile.ReadLine()

    '========================================

    'Connect on the machine namespace

    'Error handler

    '========================================                

    On Error Resume Next

                                          WScript.echo " "&vbctrl

                                          wscript.echo "=================================================="

                                 Set objSWbemServices = objSWbemLocator.ConnectServer(strcomputer, "root\cimv2", Admin, Pwd)

                                          If err.number <> 0 Then

                                                    showerr = Err.Description

                                                    Select Case Hex(Err.Number)

                                                                 Case "800706BA"

                                                                        exec = "ping -n 2 -w 1000 " & strComputer

                                                                       WScript.Echo "Executing " & exec & ""

                                                                       Set objWshScriptExec = oShell.Exec(exec)

                                                                       strPingResults = LCase(objWshScriptExec.StdOut.ReadAll)

                                                                                 If InStr(strPingResults, "TTL=128") Then

                                                                                          WScript.Echo "Could not connected "& strComputer

                                                                                          WScript.Echo "Error reported is "&showerr&" .But "&strcomputer&" this connects in the network. Verify the DCOM or WMI issues. Generated registry for C:\ConnFailed.log"&vbctrl

                                                                                           ologFile.WriteLine strComputer &"-"&showerr&"-The machine is active in the network."

                                                                                           WScript.echo "================================================="     

                                                                                 Else

                                                                                           WScript.Echo "Could not connect to "&strComputer

                                                                                          WScript.Echo "Error reported is "&showerror&" The machine name record doesn’t exist or the machine not connect in the network. Generated registry for C:\ConnFailed.log"&vbctrl

                                                                                           ologFile.WriteLine strComputer &"-"&showerr&"-The machine is inactive in the network."

                                                                                           WScript.echo "=================================================="                                            

                                                                                 End If

                                                                                

                                                                 Case "80070005"

                                                                        WScript.Echo "Credentials supplied do not have admin access to "& StrComputer&". Gerando registro para C:\ConnFailed.log"&vbctrl

                                                                        WScript.echo " "&vbctrl

                                                              ologFile.WriteLine strComputer &" - Credentials supplied do not have admin access to "& StrComputer

                                                                        wscript.echo "==================================================="                                                                              

                                                             

                                                                 Case "80041064"

                                                                       Wscript.echo "Credentials do not need to be supplied if connecting to local box "&vbctrl

                                                                       WScript.echo "Delete the name of the local machine in the c:\machine.txt file"

                                                                       wscript.echo " "&vbctrl

                                                                       ologFile.WriteLine strComputer &"Credentials do not need to be supplied if connecting to local box "                                           

                                     End Select                                  

                                 Else

                                          WScript.echo "The machine "&StrComputer&" sucessfully connected."&vbctrl

                                          WScript.echo "Executing the commands - Verify the KIXTART log in \\myserver\myshare\log"&vbctrl

                                          WScript.echo " "&vbctrl

    '========================================

    ‘Copy the files and executed the init.cmd

    'init.cmd initialize the CCMRepair.kix

    '========================================      

                                     oShell.Run ("cmd /c psexec \\"&strcomputer&" -u "&Admin&" -p "&Pwd&" cmd /c xcopy /y /z "&chr(34)&"\\MyServer\Myshare\ccmrepair\script\*.*"&chr(34)&" "&chr(34)&"\\"&strcomputer&"\admin$\ccmrepair\"&chr(34)),1,true

                                          oShell.Run ("cmd /c psexec \\"&strcomputer&" -u "&Admin&" -p "&Pwd&" "&chr(34)&"%windir%\ccmrepair\init.cmd"&chr(34))

                                          WScript.echo "===================================================" 

                                 End If                              

    Wend

     

    Strmsg = MsgBox("Read the C:\Machines.txt and executing actions.",0,"Finish CCMRepair")

    Set objWsh = oShell.Exec(fim)

    ologFile.Close

    ofs.Close

    End If

    Set objWsh = nothing

    Set objServices = nothing

    Set objSWbemServices = nothing

    Set Wshell = nothing

    set oipFile = nothing

    Set oShell = nothing

     

    After you create the structure and executing the scripts all the WMI or CCM Client problem will be fixed.

     

    Exist many opportunities to make the code of the CCMRepair.vbs and CCMRepair.kix better.

    But this is scripts fixes 100% of the CCM Clients in my domain.

     

    Regards,

     

    Leandro Farom

     

    Standardize. Simplify. Automate.

     


    Leandro Farom
    • Edited by Leandro Farom Friday, July 31, 2009 6:04 AM
    • Marked as answer by Yog Li Wednesday, August 26, 2009 6:52 AM
    Thursday, July 30, 2009 11:38 PM

All replies

  • See http://social.technet.microsoft.com/Forums/en-US/configmgrsetup/thread/0fdb7ef2-25c9-4b96-bda0-927cc0ae280a.
    Just as a side note: ConfigMgr just uses WMI as an underlying technology, so this question would fit better in an OS related forum/newsgroup.
    • Marked as answer by Yog Li Wednesday, August 26, 2009 6:52 AM
    Thursday, July 30, 2009 11:42 AM
    Moderator
  • Hi, Bill.  Would these clients happen to be deployments based off the same computer image?

    There's been some discussion recently about this on the ConfigMgr email discussion list.  See the thread in the archives (includes a script for automation):

    http://myitforum.com/cs2/blogs/smslist/archive/2009/07/29/mssms-ot-wmi-corruption-f6t623q.aspx

    ConfigMgr list:

    http://www.myitforum.com/lists/#Microsoft_Systems_Management_Server_(SMS)_List
    Rod Trent http://www.myITforum.com System Center community
    Thursday, July 30, 2009 11:00 PM
  • ***Because of the limitation of the body, I posted my suggestion in the two posts. ***
    I am a beginner in SCCM troubleshooting problems. In the last month I have a lot of problems with the CCMSetup, SCCM Reports, SCCM Deployments, etc.

    The root cause of this problem was the WMI repository.

    I had 100 machines in my domain that the CCM Client is not working property, SCCM packages fail, inventory software and hardware fail, etc

    After executing the process describes bellow, the actual number of the machines problem is 0.

    So, the question is:

    How correct the WMI Repository in large scale and remotely?

     

    I created some stuffs...

     

    1 - Pre-requisites:

     1.1 - Download the PSEXEC in http://technet.microsoft.com/en-us/sysinternals/default.aspx and copy the program for the c:\windows\system32.

    The sysinternals tools is awesome !.

     1.2 - Create one directory in network share (allow access “read and execute” to Domain Users in your domain) called CCMREPAIR. Inside the CCMREPAIR directory, you must create the 2 subdirectories. One subdirectory called LOG and other subdirectory called SCRIPT.

     1.3 - Download the Kixtart 2010 4.51 (kix32.exe) in http://www.kixtart.org/. Extract the file kix32.exe and copy to CCMREPAIR\SCRIPT\ Directory.

     1.4 - Open the notepad and write the command line bellow:

    “c:\windows\ccmrepair\kix32.exe c:\windows\ccmrepair\ccmrepair.kix”

    Salve the document in CCMREPAIR\SCRIPT\ directory with the name of “init.cmd”

     

     1.5 – Copy the CCMSetup.exe to CCMREPAIR\SCRIPT\ directory in your network.

     1.6 – Create in your machine one file called C:\machines.txt.

     In the c:\machines.txt file, you write all the NETBIOS machine name targets, without blank spaces,

    See the format of the machines.txt file:

    Br506abc

    Br506ade

    Br506erf

    ***You must executed the CCMREPAIR.VBS (Vbscript Language, item 2) in the same machine where you created the c:\machines.txt and put the PSEXEC.***

     

    1 – Fix script - CCMRepair.kix

    I love the script languages. The Kixtart is very powerfull script language and could be running without System Operation dependencies.

    Then, if the WMI or others functions in Windows Operation System not is trustable, run scripts in Kixtart language is a good choice to fix the problems.

    Copy the Kixtart Code in notepad and salve in CCMREPAIR\SCRIPT\ directory with the name of CCMRepair.kix.

    ATTENTION – You must change the values of the items bellows, to adequate the script for your environment.

    $Server = \\Myserver\Mysare$\CCMREPAIR\LOG\

     

    shell "%comspec% /c c:\windows\ccmrepair\ccmsetup.exe /noservice SMSSLP=SCCMSERVER SMSSITECODE=AUTO SMSCACHESIZE=2048"

     

    Kixtart Code:

    ;*******************************************************************

    ;**CCMRepair.kix

    ;**KiXtart SCCM Client Repair

    ;**Created: 02-JUL-2009

    ;**Last Modified:09-JUL-2009

    ;**Leandro A. Farom (leandrofarom@hotmail.com)

    ;*******************************************************************

    ;=================================================

    ;Set Options, Declare Variables and other things..

    ;Hide the console during the executing. If you not comment this line, the execution in visible in prompt.

    ;================================================

    ;$ = SetConsole("Hide")

    Global $Computer

    Global $WMI,$Nul,$TheService,$Service,$ServiceName,$ServiceDisplayName,$ServiceState,$Start,$Stop,$Process,$Processes

    Global $FindActiveProcess

    Global $KillActiveProcess

    Global $ServiceShutDownError

    Global $ServiceStartupError

    Global $log,$W,$Server,$Computer,$Reboot,$CCMInstall

    ;=================================================

    ;The variable receives the Computer name

    ;=================================================

    $Computer = @WKSTA

    ;=================================================

    ;Local for output log

    ;=================================================

    $Server = "\\Myserver\Mysare$\log\"

    $log = ($Server+$Computer+"_" + SubStr (@DATE,1,4) + SubStr(@DATE,6,2)+ SubStr (@DATE,9,2) + ".log")

    ;=================================================

    ;Set the variable to check if the path exist. Use in the final of the script

    ;=================================================

    $CCMInstall = "C:\Windows\System32\CCM"

    ;=================================================

    ;Verify if the log file exist

    ;=================================================

    if exist ($log)

    shell "%comspec% /c del /S /Q "+$log

    endif

    if not exist ($log)

    Open(3,$log,5) = 0

    ;=================================================

    ;I Write the log after each action. It is not the better way, but is functionally. I wrote the hour and minute of the each action

    ;=================================================

    $w=WriteLine(3, "========================= "+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Execution Begin - " + @date +" "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "Correct the CCM Client - CCMRepair.kix"+ Chr(13) + Chr(10))

    $w=WriteLine(3, "========================"+ Chr(13) + Chr(10))

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    $w=WriteLine(3, "========================="+ Chr(13) + Chr(10))

    ;=================================================

    ;Verify the services, services depended and take actions.

    ;=================================================

    $w=WriteLine(3, "Verify the services and take actions as need - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "=========================="+ Chr(13) + Chr(10))

    ;=================================================

    ;If the CCM Client try to install, kill the process

    ;=================================================

    $ProcessName = "CCMSETUP.EXE"

    $w=WriteLine(3, "Terminate the process $ProcessName - "+ @time + Chr(13) + Chr(10))

    ;If ($KillActiveProcess = "Process Terminated") Or ($KillActiveProcess = "Process NOT Terminated")

    ;$KillActiveProcess = "Process doesn’t exist"

    ;endif

    If ($KillActiveProcess = "")

    $KillActiveProcess = "Process DOESN’T exist or NOT this active"

    else

    $Nul = $KillActiveProcess($ProcessName)

    endif

    sleep 20

    $w=WriteLine(3, "$KillActiveProcess "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;=================================================

    ;Stop the CCMEXEC Service

    ;=================================================

    $ServiceName = "CCMEXEC"

    $w=WriteLine(3, "Stopping the service $ServiceName - "+ @time + Chr(13) + Chr(10))

    $Nul = StopService($ServiceName)

    sleep 20

    $w=WriteLine(3, "$WriteServiceStopError "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;=================================================

    ;Stop the BITS Service

    ;=================================================

    $ServiceName = "BITS"

    $w=WriteLine(3, "Parando serviço $ServiceName - "+ @time + Chr(13) + Chr(10))

    $Nul = StopService($ServiceName)

    sleep 20

    $w=WriteLine(3, "$WriteServiceStopError "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;=================================================

    ;Stop the WINMGMT

    ;=================================================

    $ServiceName = "WINMGMT"

    $w=WriteLine(3, "Parando serviço $ServiceName - "+ @time + Chr(13) + Chr(10))

    $Nul = StopService($ServiceName)

    sleep 20       

    $w=WriteLine(3, "$WriteServiceStopError "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Remove The WBEM Repository

    ;========================================

    $w=WriteLine(3, "========================+"+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Remove the WBEM Repository - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "========================="+ Chr(13) + Chr(10))

    go c:

    cd "%windir%\system32\wbem"

    $w=WriteLine(3, "Delete the files in WBEM Repository - "+ @time + Chr(13) + Chr(10))

    shell "%comspec% /c del /S /Q repository\*.* "

    $w=WriteLine(3, "Delete the WBEM Repository - "+ @time + Chr(13) + Chr(10))

    shell "%comspec% /c rd /S /Q repository "

    $w=WriteLine(3, "========================="+ Chr(13) + Chr(10))

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Start the WMI Service (Winmgmt)

    ;========================================

    $w=WriteLine(3, "========================="+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Start the Winmgmt services - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "========================"+ Chr(13) + Chr(10))

    $ServiceName = "winmgmt"

    $Nul = StartService ($ServiceName)

    sleep 20

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Re-register DLL e compile the o .MOF

    ;========================================

    $w=WriteLine(3, "========================="+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Re-registra DLL e compila o .MOF  - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "========================="+ Chr(13) + Chr(10))

    Shell "%comspec% /c for /f %%s in ('dir /b *.dll') do regsvr32 /s %%s"

    Shell "%comspec% /c for /f %%s in ('dir /b *.mof *.mfl') do mofcomp %%s"

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Re-register DLL and compila o .MOF inside CCM Directory

    ;========================================

    $w=WriteLine(3, "======================"+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Re-registra DLL e compila o .MOF CCM - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "======================"+ Chr(13) + Chr(10))

    go c:

    cd $CCMInstall

    shell "%comspec% /c for /f %%s in ('dir /b *.dll') do regsvr32 /s %%s"

    shell "%comspec% /c for /f %%s in ('dir /b *.mof *.mfl') do mofcomp %%s"

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Uninstall CCM Client

    ;========================================

    $w=WriteLine(3, "====================="+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Uninstall the CCM Client  - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "====================="+ Chr(13) + Chr(10))

    go c:

    shell "%comspec% /c c:\windows\ccmrepair\ccmsetup.exe /uninstall"

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Remove CCM and CCMSetup directory

    ;========================================

    $w=WriteLine(3, "========================"+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Remove os diretórios CCM e CCMSetup - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "======================"+ Chr(13) + Chr(10))

    go c:

    cd "%windir%\system32\"

    shell "%comspec% /c del /S /Q ccmsetup\*.*"

    shell "%comspec% /c rd /S /Q ccmsetup"

    shell "%comspec% /c del /S /Q ccm\*.*"

    shell "%comspec% /c rd /S /Q ccm"

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Start BITS Service

    ;========================================

    $w=WriteLine(3, "==========================="+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Inicializa o servico BITS - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "========================"+ Chr(13) + Chr(10))

    $ServiceName = "BITS"

    $Nul = StartService ($ServiceName)

    sleep 20

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Install the CCM Client with the CCMSetup.exe

    ; To install I used the advanced options.

    ;/noservice =

    ;/SMSSLP =

    ;/SMSSITECODE=

    ;/SMSCACHESIZE=2048

    ;========================================

    $w=WriteLine(3, "==================="+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Instala CCM Client - "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "==================="+ Chr(13) + Chr(10))

    go c:

    sleep 120

    shell "%comspec% /c c:\windows\ccmrepair\ccmsetup.exe /noservice SMSSLP=SCCMSERVER SMSSITECODE=AUTO SMSCACHESIZE=2048"

    ;========================================

    ; Verify If restart the machine is necessary to complete the CCMSetup installation.

    ; Some times, to proceed with the CCMSetup installation, the operation system must ;be restarted. The BITS service waits the restarted machine to proceed with the ;download of the Client.msi and then finish the CCM Client install.

    ;The script DOESN’T force the machine restart.

    ;========================================

    if not exist ($CCMInstall)

    $Reboot = "It’s necessary restart the machine to complete the installation process - BITS Schedule"

    else

    $Reboot = "CCM Client Successful installation"

    endif

    $w=WriteLine(3, "$Reboot "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, " "+ Chr(13) + Chr(10))

    ;========================================

    ;Finish the script execution

    ;========================================

    $w=WriteLine(3, "======================"+ Chr(13) + Chr(10))

    $w=WriteLine(3, "Finish  Log - " + @date +" "+ @time + Chr(13) + Chr(10))

    $w=WriteLine(3, "================="+ Chr(13) + Chr(10))

    $ = Close (3)

    Exit

    ;=========================================

    ;SubFunctions, Functions and Routines

    ;=========================================

    ;=========================================

    ;Find the process

    ;=========================================

    Function FindActiveProcess($ProcessName)

       $FindActiveProcess = "Process Not Found"

       $Processes = GetObject("winmgmts://" + $Computer).InstancesOf("win32_process")

       For Each $Process in $Processes

          If $Process.Name = $ProcessName

             $FindActiveProcess = "Process Running"

          EndIf

       Next

    EndFunction

     ***Continue in the next post***

    • Edited by Leandro Farom Friday, July 31, 2009 12:59 AM
    • Marked as answer by Yog Li Wednesday, August 26, 2009 6:52 AM
    Thursday, July 30, 2009 11:37 PM
  • ;========================================

    ;Kill the Process

    ;========================================

    Function KillActiveProcess($ProcessName)

       $KillActiveProcess = "Process Not Found"

       $Processes = GetObject("winmgmts://" + $Computer).InstancesOf("win32_process")

       For Each $Process in $Processes

          If $Process.Name = $ProcessName

             $Nul = $Process.Terminate

          EndIf

       Next

       Sleep 1

       $Nul = FindActiveProcess($ProcessName)

       If $FindActiveProcess = "Process Running"

          $KillActiveProcess = "Process Terminated"

       Else

          $KillActiveProcess = "Process NOT Terminated"

       EndIf

    EndFunction

    ;========================================

    ;Stop the service

    ;========================================

    Function StopService ($ServiceName)

       $ServiceShutDownError = 0

       $WMI = GetObject("winmgmts:\\" + $Computer)

       If $WMI = 0

          $ServiceShutDownError = 1;

       Else

          $TheService = $WMI.Get("Win32_Service.Name='$ServiceName'")

          If $TheService = 0

          Else

             $Service = GetObject("winmgmts:Win32_Service.Name='$ServiceName'")

             $Nul = $Service.SetInfo

             $ServiceDisplayName = $Service.DisplayName

             $ServiceState = $Service.State

             If Not $ServiceState = "STOPPED"

                $Stop = $Service.StopService()

                $Nul = $Service.SetInfo

                If $Stop = 0

                   $ServiceStopError = 0

                                    $WriteServiceStopError = "The service successfully stopped"

                Else

                   $ServiceStopError = 1

                                    $WriteServiceStopError = "The service DOESN’T successfully stopped (The service could be not active)"

                                 Endif  

             EndIf

          EndIf

       EndIf

    EndFunction


    2 – Deployment Script – CCMRepair.vbs

    Now, it’s necessary copy and executes the files, include the CCMRepair.kix, to the machines where CCM Client show problems.

    Here is a little script in VBScript language to deployment the files in multiple machines and treatment the RPC errors.

    All the output is send for the MS-PROMPT.

    ATTENTION – You must change the values of the items bellows, to adequate the script for your environment.

     

    Admin = "mydomain\userid"

    Pwd = "password"

    *** The credentials informed they must be rights of the administrator in machine target***

     

    oShell.Run ("cmd /c psexec \\"&strcomputer&" -u "&Admin&" -p "&Pwd&" cmd /c xcopy /y /z "&chr(34)&"\\MyServer\Myshare\ccmrepair\script\*.*"&chr(34)&" "&chr(34)&"\\"&strcomputer&"\admin$\ccmrepair\"&chr(34)),1,true

     

      

    VBscript Code:

    On Error Resume Next

    Const ForAppending = 8

    '========================================

    'Credentials to access the machines

    '========================================

    Admin = "mydomain\userid"

    Pwd = "password"

    '========================================

    'Kill the MS-Prompt

    '========================================

    Fim = "Exit"

    '========================================

    'Object to access the machines

    '========================================

    Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")

    '========================================

    'Open the c:\machine.txt and read the

    'machine names

    '========================================

    Set ofs = createobject("scripting.filesystemobject")

    StrList = "C:\Machines.txt"

    set oipFile = ofs.opentextfile(StrList, 1, false)

    '========================================

    'Shell Objects

    '========================================

    Set oShell = wscript.CreateObject("wscript.Shell")

    Set wShell = CreateObject("Wscript.Shell")

    '========================================

    'Create a log file connection

    'If the machine cannot connected, write the

    'machine name in this log file

    '========================================

    Set olog = createobject("scripting.filesystemobject")

    Set ologCreate = olog.CreateTextFile("C:\ConnFailed.log")

    ologCreate.Close

    set ologFile = olog.OpenTextFile("c:\ConnFailed.log", ForAppending)

    '========================================

    'Verify the error when try access

    'the c:\machines.txt file.

    'If the file DOESN'T exist, finish the script execution

    'else read line by line the file.

    'Note: The c:\machines.txt must contain the NETBIOS name of

    'the machine, without blank spaces

     ''Example:

     ''BR234LE

     ''BR655TE

     ''BR90FG

     '========================================

              if (Err.Number <> 0) then

                       Strmsg=MsgBox("The file "&strlist&" DOESN'T exist",0,"Close the script")

                       Set objWsh = oShell.Exec(fim)    

                                 else

                                 while not oipFile.atEndOfStream

                                 strComputer = oipFile.ReadLine()

    '========================================

    'Connect on the machine namespace

    'Error handler

    '========================================                

    On Error Resume Next

                                          WScript.echo " "&vbctrl

                                          wscript.echo "=================================================="

                                 Set objSWbemServices = objSWbemLocator.ConnectServer(strcomputer, "root\cimv2", Admin, Pwd)

                                          If err.number <> 0 Then

                                                    showerr = Err.Description

                                                    Select Case Hex(Err.Number)

                                                                 Case "800706BA"

                                                                        exec = "ping -n 2 -w 1000 " & strComputer

                                                                       WScript.Echo "Executing " & exec & ""

                                                                       Set objWshScriptExec = oShell.Exec(exec)

                                                                       strPingResults = LCase(objWshScriptExec.StdOut.ReadAll)

                                                                                 If InStr(strPingResults, "TTL=128") Then

                                                                                          WScript.Echo "Could not connected "& strComputer

                                                                                          WScript.Echo "Error reported is "&showerr&" .But "&strcomputer&" this connects in the network. Verify the DCOM or WMI issues. Generated registry for C:\ConnFailed.log"&vbctrl

                                                                                           ologFile.WriteLine strComputer &"-"&showerr&"-The machine is active in the network."

                                                                                           WScript.echo "================================================="     

                                                                                 Else

                                                                                           WScript.Echo "Could not connect to "&strComputer

                                                                                          WScript.Echo "Error reported is "&showerror&" The machine name record doesn’t exist or the machine not connect in the network. Generated registry for C:\ConnFailed.log"&vbctrl

                                                                                           ologFile.WriteLine strComputer &"-"&showerr&"-The machine is inactive in the network."

                                                                                           WScript.echo "=================================================="                                            

                                                                                 End If

                                                                                

                                                                 Case "80070005"

                                                                        WScript.Echo "Credentials supplied do not have admin access to "& StrComputer&". Gerando registro para C:\ConnFailed.log"&vbctrl

                                                                        WScript.echo " "&vbctrl

                                                              ologFile.WriteLine strComputer &" - Credentials supplied do not have admin access to "& StrComputer

                                                                        wscript.echo "==================================================="                                                                              

                                                             

                                                                 Case "80041064"

                                                                       Wscript.echo "Credentials do not need to be supplied if connecting to local box "&vbctrl

                                                                       WScript.echo "Delete the name of the local machine in the c:\machine.txt file"

                                                                       wscript.echo " "&vbctrl

                                                                       ologFile.WriteLine strComputer &"Credentials do not need to be supplied if connecting to local box "                                           

                                     End Select                                  

                                 Else

                                          WScript.echo "The machine "&StrComputer&" sucessfully connected."&vbctrl

                                          WScript.echo "Executing the commands - Verify the KIXTART log in \\myserver\myshare\log"&vbctrl

                                          WScript.echo " "&vbctrl

    '========================================

    ‘Copy the files and executed the init.cmd

    'init.cmd initialize the CCMRepair.kix

    '========================================      

                                     oShell.Run ("cmd /c psexec \\"&strcomputer&" -u "&Admin&" -p "&Pwd&" cmd /c xcopy /y /z "&chr(34)&"\\MyServer\Myshare\ccmrepair\script\*.*"&chr(34)&" "&chr(34)&"\\"&strcomputer&"\admin$\ccmrepair\"&chr(34)),1,true

                                          oShell.Run ("cmd /c psexec \\"&strcomputer&" -u "&Admin&" -p "&Pwd&" "&chr(34)&"%windir%\ccmrepair\init.cmd"&chr(34))

                                          WScript.echo "===================================================" 

                                 End If                              

    Wend

     

    Strmsg = MsgBox("Read the C:\Machines.txt and executing actions.",0,"Finish CCMRepair")

    Set objWsh = oShell.Exec(fim)

    ologFile.Close

    ofs.Close

    End If

    Set objWsh = nothing

    Set objServices = nothing

    Set objSWbemServices = nothing

    Set Wshell = nothing

    set oipFile = nothing

    Set oShell = nothing

     

    After you create the structure and executing the scripts all the WMI or CCM Client problem will be fixed.

     

    Exist many opportunities to make the code of the CCMRepair.vbs and CCMRepair.kix better.

    But this is scripts fixes 100% of the CCM Clients in my domain.

     

    Regards,

     

    Leandro Farom

     

    Standardize. Simplify. Automate.

     


    Leandro Farom
    • Edited by Leandro Farom Friday, July 31, 2009 6:04 AM
    • Marked as answer by Yog Li Wednesday, August 26, 2009 6:52 AM
    Thursday, July 30, 2009 11:38 PM
  • Thanks. 

    I don't disagree, but...generally, I don't know of WMI problems, UNTIL I use SCCM (or, try to).

    While obviously not an SCCM issue, SCCM is so dependent, and, so requiring of solid WMI, that, it seems it's almost a required sub-forum?

    Thursday, August 06, 2009 2:34 AM
  • Some are, some are individual builds.

    Also, this is at multiple sites, so, there is some commonality, outside of clones (most are GHOST).

    And, I built my computer from scratch, and, WMIDiag reports errors in that, too (minor, I guess).

    There seems to be errors with ALL installs of XP SP3 (noticed this when I used SCCM R2 and task sequences to push out XP SP3, and, it seemed to take a while for the computer to "recover" from the install, with all sorts of interesting errors in the smsts.log):

    17962 15:34:13 (2) !! WARNING: WMI DCOM components registration is missing for the following EXE/DLLs: .................................... 6 WARNING(S)!

    17963 15:34:13 (0) ** - C:\WINDOWS\SYSTEM32\WBEM\FASTPROX.DLL (\CLSID\{7A0227F6-7108-11D1-AD90-00C04FD8FDFF}\InProcServer32)

    17964 15:34:13 (0) ** - C:\WINDOWS\SYSTEM32\WBEM\FASTPROX.DLL (\CLSID\{D71EE747-F455-4804-9DF6-2ED81025F2C1}\InProcServer32)

    17965 15:34:13 (0) ** - C:\WINDOWS\SYSTEM32\WBEM\FASTPROX.DLL (\CLSID\{ED51D12E-511F-4999-8DCD-C2BAC91BE86E}\InProcServer32)

    17966 15:34:13 (0) ** - C:\WINDOWS\SYSTEM32\WBEM\WBEMPROX.DLL (\CLSID\{4C6055D8-84B9-4111-A7D3-6623894EEDB3}\InProcServer32)

    17967 15:34:13 (0) ** - C:\WINDOWS\SYSTEM32\WBEM\WBEMPROX.DLL (\CLSID\{A1044801-8F7E-11D1-9E7C-00C04FC324A8}\InProcServer32)

    17968 15:34:13 (0) ** - C:\WINDOWS\SYSTEM32\WBEM\WBEMPROX.DLL (\CLSID\{F7CE2E13-8C90-11D1-9E7B-00C04FC324A8}\InProcServer32)

    17969 15:34:13 (0) ** => WMI System components are not properly registered as COM objects, which could make WMI to

    17970 15:34:13 (0) **    fail depending on the operation requested.

    17971 15:34:13 (0) ** => For a .DLL, you can correct the DCOM configuration by executing the 'REGSVR32.EXE <Filename.DLL>' command.

    Even after using regsvr32 and rebooting, same errors are still there.

    After installing Office 2007 w/SP1:

    20032 16:08:38 (0) ** WMI ProgID registrations: ........................................................................................... OK.

    20033 16:08:38 (2) !! WARNING: WMI provider DCOM registrations missing for the following provider(s): ..................................... 1 WARNING(S)!

    20034 16:08:38 (0) ** - ROOT/MSAPPS11, OffProv11 ({F7107F37-C761-4748-B686-055F45889DCD}) (i.e. WMI Class 'Win32_ExcelComAddins')

    20035 16:08:38 (0) **   Provider DLL: 'WMI information not available (This could be the case for an external application or a third party WMI provider)'

    20036 16:08:38 (0) ** => This is an issue because there are still some WMI classes referencing this list of providers

    20037 16:08:38 (0) **    while the DCOM registration is wrong or missing. This can be due to:

    20038 16:08:38 (0) **    - a de-installation of the software.

    20039 16:08:38 (0) **    - a deletion of some registry key data.

    20040 16:08:38 (0) **    - a registry corruption.

    20041 16:08:38 (0) ** => You can correct the DCOM configuration by:

    20042 16:08:38 (0) **    - Executing the 'REGSVR32.EXE <Provider.DLL>' command.

    20043 16:08:38 (0) **    Note: You can build a list of classes in relation with their WMI provider and MOF file with WMIDiag.

    20044 16:08:38 (0) **          (This list can be built on a similar and working WMI Windows installation)

    20045 16:08:38 (0) **          The following command line must be used:

    20046 16:08:38 (0) **          i.e. 'WMIDiag CorrelateClassAndProvider'

    20047 16:08:38 (2) !! WARNING: Re-registering with REGSVR32.EXE all DLL from 'C:\WINDOWS\SYSTEM32\WBEM\'

    20048 16:08:38 (0) **          may not solve the problem as the DLL supporting the WMI class(es)

    20049 16:08:38 (0) **          can be located in a different folder.

    20050 16:08:38 (0) **          You must refer to the class name to determine the software delivering the related DLL.

    20051 16:08:38 (0) ** => If the software has been de-installed intentionally, then this information must be

    20052 16:08:38 (0) **    removed from the WMI repository. You can use the 'WMIC.EXE' command to remove

    20053 16:08:38 (0) **    the provider registration data.

    20054 16:08:38 (0) **    i.e. 'WMIC.EXE /NAMESPACE:\\ROOT\MSAPPS11 path __Win32Provider Where Name='OffProv11' DELETE'

    20055 16:08:38 (0) ** => If the namespace was ENTIRELY dedicated to the intentionally de-installed software,

    20056 16:08:38 (0) **    the namespace and ALL its content can be ENTIRELY deleted.

    20057 16:08:38 (0) **    i.e. 'WMIC.EXE /NAMESPACE:\\ROOT path __NAMESPACE Where Name='MSAPPS11' DELETE'

    20058 16:08:38 (0) **    - Re-installing the software.

     

    (with thanks to Dennis Wendland)

    Sooo...am NOT too happy with all the issues.

    Thanks for the links, I'll peruse them!

    Thursday, August 06, 2009 2:42 AM
  • WOW!!!

    Leandro, I'm impressed!!

    Will take a look at getting this used.
    Thursday, August 06, 2009 2:43 AM