How to re-install WMI for Windows XP

Discussion in 'Windows XP WMI' started by Frank R?der, Oct 6, 2004.

  1. Frank R?der

    Frank R?der Guest

    I have a problem with my WMI it's corrupted after installing SP2 for
    Windows XP.

    I have tried everything (I believe): Rebuilding repository has no
    effect, tried remove "hide" in sysoc.inf for WBEM, but I could not
    remove the checkmark in the Windows program components to remove the
    application....

    I have not found any article about re-installing WMI on a Windows XP.

    Does any have any idea ?

    Regards
    Frank Röder
    Systems Engineer.
     
    Frank R?der, Oct 6, 2004
    #1
    1. Advertisements

  2. Frank R?der

    Luke Edson Guest

    I saw this in the Group Policy Newsgroup:

    -----Begining of copied message-------

    . Reply (E-mail) Forward (E-mail)

    Subject: Re: WMI generic failure
    From: "Todd J Heron" <>
    Sent: 10/5/2004 11:48:46 AM




    Copy the lines below into a CMD script and run it on your
    machine. Let me
    know if it works.

    --
    Todd J Heron, MCSE
    Windows 2003/2000/NT

    COPY ALL LINES BELOW:

    net stop winmgmt

    pause

    c:

    cd c:\windows\system32\wbem

    rd /S /Q repository

    regsvr32 /s %systemroot%\system32\scecli.dll

    regsvr32 /s %systemroot%\system32\userenv.dll

    mofcomp cimwin32.mof

    mofcomp cimwin32.mfl

    mofcomp rsop.mof

    mofcomp rsop.mfl

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

    for /f %%s in ('dir /b *.mof') do mofcomp %%s

    for /f %%s in ('dir /b *.mfl') do mofcomp %%s

    mofcomp exwmi.mof

    mofcomp -n:root\cimv2\applications\exchange wbemcons.mof

    mofcomp -n:root\cimv2\applications\exchange smtpcons.mof

    mofcomp exmgmt.mof


    "t" <> wrote in message
    news:...
    > C:\WINDOWS\system32\wbem
    >
    >
    > "Todd J Heron" <> wrote

    in message
    > news:#...
    > What is the path of the path of the wbem folder?
    >
    > --
    > Todd J Heron, MCSE
    > Windows 2003/2000/NT
    > "t" <> wrote in message
    > news:%...
    > Hi All,
    > any 1 could help on this, any time try to create new

    WMI filter it gives
    > me an error "Generic Failure" 0X80041001 WBEM_E_FAILED

    call failed, tried
    > to
    > stop WMI services and restarted it but it did not fix

    the problem. rebuild
    > the WMI repository also did not fix the problem.
    > I am running out of Ideas, re-install windows 2003

    server in not an
    > option.
    > Please help.
    >
    > Tim
    >
    >


    ----End of copied message------

    >-----Original Message-----
    >I have a problem with my WMI it's corrupted after

    installing SP2 for
    >Windows XP.
    >
    >I have tried everything (I believe): Rebuilding

    repository has no
    >effect, tried remove "hide" in sysoc.inf for WBEM, but I

    could not
    >remove the checkmark in the Windows program components

    to remove the
    >application....
    >
    >I have not found any article about re-installing WMI on

    a Windows XP.
    >
    >Does any have any idea ?
    >
    >Regards
    >Frank Röder
    >Systems Engineer.
    >.
    >
     
    Luke Edson, Oct 6, 2004
    #2
    1. Advertisements

  3. Frank R?der

    LeeSchoff Guest

    I ran the script. A number of errors. Generally invalid namespace or
    missing .mof files. They follow:

    C:\WINDOWS\system32\wbem>mofcomp Outlook_01c3d2f4d6781d55.mof
    Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180
    Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
    Parsing MOF file: Outlook_01c3d2f4d6781d55.mof
    MOF file has been successfully parsed
    Storing data in the repository...
    An error occurred while creating object 1 defined on lines 31 - 163:
    0X80041002 Class, instance, or property 'Win32_PerfRawData' was not
    found.
    Compiler returned error 0x80041001

    C:\WINDOWS\system32\wbem>mofcomp exwmi.mof
    Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180
    Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
    File 'exwmi.mof' not found!

    C:\WINDOWS\system32\wbem>mofcomp -n:root\cimv2\applications\exchange
    wbemcons.mof
    Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180
    Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
    Parsing MOF file: wbemcons.mof
    MOF file has been successfully parsed
    Storing data in the repository...
    An error occurred while opening the namespace for object 1 defined on
    lines 3 - 10:
    Error Number: 0x8004100e, Facility: WMI
    Description: Invalid namespace

    Compiler returned error 0x8004100e
    C:\WINDOWS\system32\wbem>mofcomp -n:root\cimv2\applications\exchange
    smtpcons.mof
    Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180
    Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
    Parsing MOF file: smtpcons.mof
    MOF file has been successfully parsed
    Storing data in the repository...
    An error occurred while opening the namespace for object 1 defined on
    lines 4 - 16:
    Error Number: 0x8004100e, Facility: WMI
    Description: Invalid namespace

    Compiler returned error 0x8004100e
    C:\WINDOWS\system32\wbem>mofcomp exmgmt.mof
    Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180
    Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
    File 'exmgmt.mof' not found!
     
    LeeSchoff, Oct 9, 2004
    #3
  4. Frank R?der

    supertech1024

    Joined:
    Jan 9, 2006
    Likes Received:
    0
    fixed my problem ..System info-Cannot collect information

    Win XP pro service pack 2
    After installing speed up my pc and win tasks pro ....system information no longer worked.
    uninstalled both programs
    system info continued to not work ...brought up help and support.
    Tried MSINFO32.exe from Start Run...still no help.
    tried to restore restore point from an earlier known working point.
    did not help.
    Verified that DCOM , event logging, error reporting, Remote procedure call (rpc),and WMI were started and set to automatic.
    I noticed that C:\WINDOWS\PCHealth\HelpCtr\OfflineCache\index.dat was missing.
    Possibly from a windows cleanup program
    copied from another XP computer.
    I eventually got system info to start But could not Collect Information.
    copied the above script and ran from command prompt as bat file.
    received the errors also of name space and MOF
    so I think the registering of the DLL's is what solved the problem.
    although I did get errors that the WMI files were corrupt and missing it turned out to not be the case.
    I think I may check for registry errors,clear event log, check that all installed programs are operating, make sure windows and other programs are fully updated, create restore point and see how things go.
    This may be an old post that I am replying to but I think others may still find some value in it like I did.
    Good luck and Happy Computing
    Supertech1024
     
    supertech1024, Jan 9, 2006
    #4
  5. Frank R?der

    tommyq

    Joined:
    Jan 17, 2007
    Likes Received:
    0
    Worked for me too

    Hi,

    I had a problem where WMI was not registered as a service at all. Tried to repair XP, run sfc, but nothing helped.
    This batch file did the trick and WMI is now running.

    Thanks a lot,
    T.
     
    Last edited: Jan 17, 2007
    tommyq, Jan 17, 2007
    #5
  6. Frank R?der

    tbarkdull

    Joined:
    Mar 20, 2006
    Likes Received:
    0
    WMI ReInstall

    This one worked for me

    Click Start > Run and type in

    rundll32.exe setupapi,InstallHinfSection WBEM 132 %windir%\inf\wbemoc.inf

    You will need an XP CD with the same version you have installed.
     
    tbarkdull, Mar 12, 2007
    #6
  7. Frank R?der

    gruppodiba

    Joined:
    Oct 20, 2008
    Likes Received:
    0
    it worked for me

    the script From: "Todd J Heron" <> posted by Luke Edson worked perfectly for my WMI, thank you.
    ciao

    Aldo
     
    gruppodiba, Oct 20, 2008
    #7
  8. Frank R?der

    ravi

    Joined:
    Nov 5, 2008
    Likes Received:
    0
    Thanks Luke Edson,
    Ref: Your reply: 06-10-2004, 08:40 PM .
    I was having WMI problem, so I could not install SMS 2003 - client Software. While manually compiling the.mof files, I got the following error. After I ran the csript in .bat file the client software could install. Thanks many more...
    The error was:
    cimwin32.mof - -- Error Number: 0x80041001, Facility: WMI
    Description: Generic failure
    Compiler returned error 0x80041001
     
    ravi, Nov 5, 2008
    #8
  9. Frank R?der

    hammadmalik

    Joined:
    Feb 6, 2009
    Likes Received:
    0
    Wmi Fix

    hi
    i had same peob with my OS ( windows xp x64 )
    and i fixed it now

    just leave every bullshit do these steps

    1) insurt Windows XP cd in CD/DVD rom
    2) open run
    3) type "sfc /scannow" hit enter

    it ll take some time after it is completed it ll be fixed
    now u can use dialup/network connection Properties Advanced tab

    i dont know about other OS infact i hv no peoblem with my winxp x64
     
    hammadmalik, Feb 6, 2009
    #9
  10. Frank R?der

    ssk007

    Joined:
    Jul 9, 2009
    Likes Received:
    0
    Yes.....!!

    The script From: "Todd J Heron" <> posted by Luke Edson worked perfectly for my WMI reinstall!!!

    Thanks so much!!You folks are awesome!!
     
    ssk007, Jul 9, 2009
    #10
  11. Frank R?der

    edmondyjh

    Joined:
    Aug 22, 2009
    Likes Received:
    0
    yes,The script From: "Todd J Heron"works for me too!! Awesome....
     
    edmondyjh, Aug 22, 2009
    #11
  12. Frank R?der

    tnjman

    Joined:
    Dec 1, 2009
    Likes Received:
    0
    WMI script works - BUT some questions remain.

    1) You mentioned to stop the wmimgt service at the beginning, but never anything about restarting it.
    2) I noticed wmimgmt service RESTARTS ITSELF! during the middle of all of this - is that okay for it to happen? It didn't seem to interfer, but I kept stopping it anyway
    3) You had "c:" - that effectively does nothing - what you meant is:
    cd/d c:\ <-- this sets the person to the top of the c: drive.
    or, better: cd/d c:\windows\system32\wbem (all in one fell swoop)

    So... why does wmimgt restart itself auto-magically - and/or did you intend to put instructions to say, "Oh yes, resart wmimgmt service at the end?

    Also, nobody ever gave the other person who asked, the correct answer to why the "exwmi.mof" is not found - is that ONLY on "Exchange servers" maybe?


    AND, finally - the 2 "mofcomp" comands at end also fail - I suppose for the same reason "exwmi.mof" fails - they are only for Exchange?

    mofcomp -n:root\cimv2\applications\exchange wbemcons.mof
    mofcomp -n:root\cimv2\applications\exchange smtpcons.mof

    [Here are some of the errors]
    Parsing MOF file: smtpcons.mof
    MOF file has been successfully parsed
    Storing data in the repository...
    An error occurred while opening the namespace for object 1 defined on lines 4 -
    16:
    Error Number: 0x8004100e, Facility: WMI
    Description: Invalid namespace
    Compiler returned error 0x8004100e
    C:\WINDOWS\system32\wbem>pause
    Press any key to continue . . .
    C:\WINDOWS\system32\wbem>mofcomp exmgmt.mof
    Microsoft (R) 32-bit MOF Compiler Version 5.2.3790.1830
    Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
    File 'exmgmt.mof' not found!
    C:\WINDOWS\system32\wbem>pause
    Press any key to continue . . .
    C:\WINDOWS\system32\wbem>echo *** THE END ***
    *** THE END ***
    C:\WINDOWS\system32\wbem>mofcomp -n:root\cimv2\applications\exchange wbemcons.mo
    f
    Microsoft (R) 32-bit MOF Compiler Version 5.2.3790.1830
    Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
    Parsing MOF file: wbemcons.mof
    MOF file has been successfully parsed
    Storing data in the repository...
    An error occurred while opening the namespace for object 1 defined on lines 3 -
    10:
    Error Number: 0x8004100e, Facility: WMI
    Description: Invalid namespace
    Compiler returned error 0x8004100e

    Thanks again! This worked for me - seemed to correct the WMI corruption.
    Cheers! (I will follow up with an updated multi-pause [LOL] script)
     
    tnjman, Dec 1, 2009
    #12
  13. Frank R?der

    tnjman

    Joined:
    Dec 1, 2009
    Likes Received:
    0
    [updated - multi-pause script - many pauses, in case you want to bail out or stop the wmimgmt service that keeps auto-magically restarting] - also - set 'echo on' - since this is a serious system-level script and we want to see all the 'juice' (opinions may vary on that, but as i had a couple of issues, this helped)

    echo on
    REM --------------
    REM - wmireset.bat
    REM --------------
    REM
    echo.
    echo Stopping winmgmt service...
    echo.
    net stop winmgmt
    echo --> WAIT a bit - MAKE SURE winmgmt stops - it sometimes takes awhile
    pause
    cd/d c:\
    cd c:\windows\system32\wbem
    echo.
    echo Cleaning repository...
    echo.
    rd /S /Q repository
    echo.
    echo --> Re-registering scecli.dll & userenv.dll
    echo.
    echo *** scecli.dll
    echo ...
    regsvr32 %systemroot%\system32\scecli.dll
    pause
    echo ** userenv **
    regsvr32 %systemroot%\system32\userenv.dll
    pause
    REM -- MOF (Managed Object Format) compiler
    echo.
    echo --> MOFcomp - re-compiling / restoring root WMI class definitions for managed objects to the WMI repository
    echo.
    mofcomp cimwin32.mof
    pause
    mofcomp cimwin32.mfl
    pause
    mofcomp rsop.mof
    pause
    mofcomp rsop.mfl
    pause
    echo.
    echo --> Re-registering related WBEM dll's & re-compiling remaining classes
    echo.
    for /f %%s in ('dir /b /s *.dll') do regsvr32 /s %%s
    pause
    for /f %%s in ('dir /b *.mof') do mofcomp %%s
    pause
    for /f %%s in ('dir /b *.mfl') do mofcomp %%s
    pause
    mofcomp exwmi.mof
    pause
    mofcomp -n:root\cimv2\applications\exchange wbemcons.mof
    pause
    mofcomp -n:root\cimv2\applications\exchange smtpcons.mof
    pause
    mofcomp exmgmt.mof
    pause
    echo *** THE END ***

    Cheers!
     
    tnjman, Dec 1, 2009
    #13
  14. Frank R?der

    Digital9x

    Joined:
    Feb 2, 2010
    Likes Received:
    0
    Internet Connection Sharing available again.

    I stumbled across this forum searching for a way to rebuild the wmi files. My issue was that I lost the internet connection sharing options when clicking the advanced tab for my dual ethernet card. You see, I have a router on the back end of one my computers. That allows me to connect my PS3 and Xbox 360 (and other devices up), all of them sharing the internet connection coming through my Alienware PC.
    I noticed that my devices wired to the router lost site of the internet. When I checked the advanced tab settings for the connection, windows had lost site of the information (some how over night), thus, no options were made available. Going back in time to another restore point didn't work, and I surely didn't want to try and rebuild windows.
    The script that was posted did the trick for my machine. I've added this golden egg to my techie note collections. I surely appreciate you posting that script. Of all of my computer schooling and training, this has to be the best "fixer-upper" I've found that prevented a major overhaul of my operating system.

    Thanks a million,

    Digital9x, aka Christopher
    Lumberton, NC
     
    Digital9x, Feb 2, 2010
    #14
  15. Frank R?der

    Tony_greek

    Joined:
    Jun 7, 2011
    Likes Received:
    0
    The script for WMI by LUKE EDSON Worked perfectly for me...I thank u so much Luke...Awesome
     
    Tony_greek, Jun 7, 2011
    #15
  16. Frank R?der

    Tony_greek

    Joined:
    Jun 7, 2011
    Likes Received:
    0
    I receive the msg: the application failed to initialize properly 0xc0000005 when I open O&O DiskImage Professional...any ideas? what could I help me?
     
    Tony_greek, Jun 9, 2011
    #16
  17. Frank R?der

    kay9man

    Joined:
    Jun 13, 2011
    Likes Received:
    0
    Has anyone tried this script on a Windows Server 2008 machine ?
     
    kay9man, Jun 13, 2011
    #17
  18. Frank R?der

    Ian2

    Joined:
    Jun 11, 2012
    Likes Received:
    0
    Thanks TNJMAN -for the nice easy copy / paste into a bat file fix.

    I had a Windows XP machine that could not connect into a Windows 2008 Server via RDP session due to higher security needs - even after being patched with:

    KB969084
    KB953760-v2
    & MSFixit50588.msi

    While looking to see if the patches were installed via systeminfo, I came accross this article and registered to say Thanks! for keeping it easy.

    -Work Smarter - Not Harder

    -Ian(2) :D
     
    Ian2, Jun 11, 2012
    #18
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. BC

    WMI for SQL on WIndows XP

    BC, Jul 21, 2004, in forum: Windows XP WMI
    Replies:
    6
    Views:
    7,489
    Gert E.R. Drapers
    Aug 8, 2004
  2. Tim Gorgs
    Replies:
    4
    Views:
    2,765
  3. Kálmán Csaba

    Unable to repaire WMI on Windows Server 2003

    Kálmán Csaba, Sep 8, 2004, in forum: Windows XP WMI
    Replies:
    1
    Views:
    13,678
    Philip Nunn [MSFT]
    Sep 21, 2004
  4. Mark Jennings
    Replies:
    3
    Views:
    30,922
    SMSAdmin1
    Dec 29, 2004
  5. Alexander Rudyk

    Remote install through WMI

    Alexander Rudyk, Jun 15, 2005, in forum: Windows XP WMI
    Replies:
    3
    Views:
    15,485
    Jim Vierra
    Jun 22, 2005
  6. sbrown

    WMI remote install

    sbrown, Feb 6, 2006, in forum: Windows XP WMI
    Replies:
    0
    Views:
    1,942
    sbrown
    Feb 6, 2006
  7. Joe
    Replies:
    0
    Views:
    2,879
  8. Georgebaker

    Run WMI within WMI

    Georgebaker, Aug 13, 2009, in forum: Windows XP WMI
    Replies:
    0
    Views:
    1,103
    Georgebaker
    Aug 13, 2009
Loading...