# Administrative Tools Problem



## gofish (Dec 25, 2007)

I am running Windows 7 Ultimate 32bit and all of a sudden I get "Class not registered" when I try to run Microsoft Management Console and other administrative tools. Anyone have any idea what could Have caused this. I haven't installed any new programs or made any configuration or setting changes.


----------



## Noobus (Oct 21, 2011)

gofish said:


> I am running Windows 7 Ultimate 32bit and all of a sudden I get "Class not registered" when I try to run Microsoft Management Console and other administrative tools. Anyone have any idea what could Have caused this. I haven't installed any new programs or made any configuration or setting changes.


Have a look at this thread: http://social.technet.microsoft.com...l/thread/2dc1f828-24b8-4c07-bb37-87d7605f9d09

Let us know how you go

L


----------



## jenae (Jun 17, 2008)

Hi, looks like WMI service is corrupt to fix:-

Copy the below text into notepad and "save as" call it “MMC.bat” (without quotes) save to desktop and then right click on the saved file and select "run as administrator" when finished Restart.


```
@echo off
sc config winmgmt start= disabled
net stop winmgmt /y
%systemdrive%
cd %windir%\system32\wbem
if exist repository.old rmdir /s/q repository.old
rename repository repository.old
for /f %%s in ('dir /b *.dll') do regsvr32 /s %%s 
for /f %s in ('dir /b *.mof *.mfl') do mofcomp %s
wmiprvse /regserver 
winmgmt /regserver 
net start winmgmt
net start SharedAccess
net start CcmExec
```


----------



## gofish (Dec 25, 2007)

Hi Jenae
created batch file and ran it - it terminated with a syntax error. I ran every line from command prompt and "winmgmt /regserver" comes up with invalid parameter. Checking "winmgmt" shows it has no such parameter maybe "/resetrepository" is correct parameter?


----------



## jenae (Jun 17, 2008)

Hi, lets do it this way, open cmd as admin (as shown) at the prompt, copy paste:-


```
cd /d %windir%\system32\wbem
```
 (press enter)

Next, copy paste:-



```
for %i in (*.dll) do RegSvr32 -s %i
```
 (press enter)

Try the snap in now.


----------



## gofish (Dec 25, 2007)

Hi
I followed your instructions for above two line entries and entered them then did a restart but problem still exists. I also can't start MMC.exe from search box even as administrator.
I can start Administrative Tools but not most of the add-ins. I also can not start them from God Mode.


----------



## jenae (Jun 17, 2008)

Hi, you may have to run a repair install to fix this (as per the noobus post), it rarely happens in isolation, so other problems will crop up. You could try this (resets to default)

Copy paste all in code box into notepad then "save as" call it mmc.reg and save to desktop, find the saved file and right click select merge to allow to be added to registry. Restart


```
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\Microsoft\MMC\{58221C66-EA27-11CF-ADCF-00AA00A80033}]
"Restrict_Run"=-
```


----------



## XweAponX (Dec 17, 2011)

Hi, I know this is an old thread - Old problem, still common. I can't run SFC, I cannot do an In-Place Install. I've scoured the internet for solutions, this thread so far has the best info.

Jenae's batch file runs, but it did not fix it. I am going to try everything else on this page. I even tried, booting to a different Win 7 partition (I got dual boot) and running SFC offline, and SFC fails to start!

Is there any way to get past this, I'm trapped in all ways. At first, It was simply I could not do Windows Update (800 error code), then it was, I could not share my printer, same error code (0x80040154), I tried running SFC - It would not run. I tried In-Place Install, it would get to the point after it copied all of the installation files to the dick, but the SETUP process was blocked. I've been able to fix this installation with similar problems before, but there is just one new thing that I'm not seeing. What do I do, re-register all the DLL/OCX files?

I'm Windows 7 Ultimate x86, NO service packs (I do not believe Win 7 SP 1 is any good), NO IE9, but I do have a bunch of MSSQL and Dot Net through 4.5 installed.

I'll keep plodding along here, but if anyone can point me to anything else, please be my guest. Thank you.


----------



## Corday (Mar 3, 2010)

To run sfc /scannow you have to be in an elevated command prompt. Don't forget the space before the /.


----------



## jenae (Jun 17, 2008)

Hi, SFC in offline mode not running is a problem (btw Vista, Seven have internal cmd, so no need for space (it isn't dos) sfc/scannow ipconfig/all chkdsk/r etc... works with or without space, do need to be run as admin in normal mode though))

Open Control panel programs and features and select the features box does it populate?

On the keyboard press Start + r together in the run box type:-


```
regsvr32 mmcndmgr.dll
```
 (press OK)

Open a cmd as admin and at the prompt type:-


```
sc queryex winmgmt > 0 & notepad 0
```
 (press enter) post the notepad outcome here. Restart computer to see if reregistering the dll helped.


----------



## XweAponX (Dec 17, 2011)

jenae said:


> Hi, SFC in offline mode not running is a problem (btw Vista, Seven have internal cmd, so no need for space (it isn't dos) sfc/scannow ipconfig/all chkdsk/r etc... works with or without space, do need to be run as admin in normal mode though))
> 
> Open Control panel programs and features and select the features box does it populate?
> 
> ...



No - The Features Box does NOT populate. Hmmm

When I do what you said, hold down those two keys and run the command: It gives me two conflicting boxes, one says it registered, the otrher says "class not resistered"


----------



## XweAponX (Dec 17, 2011)

Ok I ran the last thing, snd here is what it says:



> SERVICE_NAME: winmgmt
> TYPE : 20 WIN32_SHARE_PROCESS
> STATE : 4 RUNNING
> (STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
> ...


----------



## XweAponX (Dec 17, 2011)

NOW MY MANAGEMENT CONSOLE is not working, it WAS working, not it's not!!!!!


----------



## XweAponX (Dec 17, 2011)

How do I undo that command you had me do?


----------



## XweAponX (Dec 17, 2011)

Wait a minute, you said press START + R together, which key is "star"?


----------



## jenae (Jun 17, 2008)

Hi, the first cmd is to be executed in the "Run" box, appears to have worked. The second from a cmd prompt (although they both work from cmd) go to start search and type cmd, right click on the returned cmd.exe and select "run as administrator" at the prompt (copy paste)



```
sc queryex winmgmt > 0 & notepad 0
```
 (press enter) post outcome here.

EDIT:- we appear to be cross posting, the WMI service is started and running, the regsvr32 cmd is a windows dll registry cmd and should be OK it is not causing your problem, a lot of system files are corrupt so one problem leads to another. How did you attempt to run sfc offline? We need to get it to run.


----------



## XweAponX (Dec 17, 2011)

I just had to do another system restore, and I am running out of valid restore points. I am NOT going to run the first command, because I know it is just going to unregister my management console again, and I can live with not getting updates, but not without my console I use it several times a day.

Here is the query results, from my WORKING management console. It is not my management console that is the problem, it is my ability to do an in-place install or run SFC, so please do not ask me to run that command again. Your first suggestion was how to get the "RUN" window up, thats what confused me, cos the first thing I do on a new PC is get that RUN command visible. I thought you were asking me to do something that was going to elevate my privileges or something, but I've run that command before, and believe me, all it does is unreg my console!

Here are those results you wanted, is there anything different in it from the last time?



> SERVICE_NAME: winmgmt
> TYPE : 20 WIN32_SHARE_PROCESS
> STATE : 4 RUNNING
> (STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
> ...



Compare that to my first one, the one I did when it was NOT working:



> SERVICE_NAME: winmgmt
> TYPE : 20 WIN32_SHARE_PROCESS
> STATE : 4 RUNNING
> (STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
> ...


And there is no difference at all, dont even know why you had me do that.

I'm trying to run SFC, and I cannot do an In-Place install either, both process are BLOCKED by Error number 0x80040154.

I need a way around that error, I need a way to run SFC.

If I ran SFC from a Hiren's Boot CD, running "mini windows XP" would it restore my windows 7 services, I can use D7 to set it up. Can it be done from a Non windows 7 workstation?

Here is what I wan to do, I use Mini XP on a Hiren's Boot CD, then install D7 and get the SFC process installed, could that be done?

Ok, well I have my console back, whatever you can show me, would be helpful. Thank you.

(Edit again) look I am going to try it, I'll be back in about half an hour, I know just how to do it, it depends on if the service exists on the CD, else I gotta copy the files from XP. If I can get SFC to just run remotely, it should fix it.


----------



## jenae (Jun 17, 2008)

Hi, (XP will not work) boot to safe mode and select advanced you should see an option to "Repair your computer" select this from the options select Command prompt you will be at a cmd prompt that say's X:\sources> at this prompt type:-


```
bcdedit | find "os device"
```
 press enter it will tell you what drive the RE has assigned your OS, most likely it will be C: if not then change the C: in this cmd to what you see:-

Next at the x:\sources type:-


```
sfc/scannow /offbootdir=c:\ /offwindir=c:\windows
```
 press enter

SFC should run, after it's finished, restart your computer.


----------



## XweAponX (Dec 17, 2011)

Allrighty.

You wanted to know how I tried to run the remote SFC?

I have a Dual Boot machine, I have two side by side partitions with Windows 7. I booted to the other partition, and I used Foolish IT's D7 to run SFC on the windows folder on the other drive.

Maybe they didn't work because, the two are still connected somehow, through the Boot Menu of my main (this) Win 7 installation.

So, the question is, can I run SFC via a Windows 7 Install Disk running the repair partition? Maybe I'll try that, but not tonight. I guess we had to see if the reg process was going to work using your command, my machine actually had become corrupt like that before, but that was before this Error 800 thing - It was a different fixable 800 error code.

I'll boot up off the DVD tomorrow AM and see if I can get it to run, thanx a lot for all your help.

HAHAHA! We x-posted again! And you answered the very question I was asking, how to get that running. I'll try it tomorrow - I got moovies to watch right now, after a day messing with this.


----------



## XweAponX (Dec 17, 2011)

Ok, I just got up. I understand your instructions, except that I don't think my Windows 7 has that "repair your computer" option - This is an original Windows 7 DVD, one of the first ones, I've been using it for years. But I've seen what you are talking about on other PCs and Laptops, it begins the Startup Repair. I just don't remember seeing it in there.

But I think I can just run it from a command propmt straight from the install DVD. I'll be doing this sometime today, I'll let you know how it turns out. Than you once again for helping me think this out.


----------



## XweAponX (Dec 17, 2011)

Ok.., thanx a lot for your help getting me to this. I just did it (corrupted system is on Drive D in this configuration- it loaded an IDE/PATA drive as "c". Same thing, SFC would NOT START.

So I am at my wits end with this, why the blazes will it not start? There are no viruses, no updates in queue that failed to install, there is nothing, I just don't understand it.

Now, it is stuck in a "startup repair" loop on the partition in question, I tried canceling it but it wants to keep checking. It didn't find anything in that partition when I ran it yesterday, it said it could not find the boot loader.

The primary partition is stuck in a repair loop, maybe I can fix it through the other partition. It's not booting from Thr main partition but from that 100mb area set aside for booting to the repair utility.


----------



## XweAponX (Dec 17, 2011)

There are 8 "winload.exe" files in there... This has happenned before, maybe this is why it won't fix. A-ha! There was a 2mb winload file in there that was not a system file! And 7 others, I just deleted winload, then renamed the newest of the dupes. Maybe this had something to do with it...


----------



## jenae (Jun 17, 2008)

Hi, do you receive a message when you try to run SFC what happens? If it says something along the lines of a pending action then still in the RE at cmd prompt type:-


```
dism.exe /image:C:\ /cleanup-image /revertpendingactions
```
 press enter (may have to change the C: to what your OS is showing as) Then try the sfc cmd again.


----------

