• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 761
  • Last Modified:

solve error please

i have got some piece of code online

sComputer        = "QIXSOL-9"
sSQLServer      = "QIXSOL-9"
Set oInstance = GetObject("winmgmts:{impersonationLevel=impersonate}//" & sComputer & "/" & "root/MicrosoftSQLServer:MSSQL_SQLServer.Name=" & Chr(34) & sSQLServer & Chr(34))
Set oOutParam = oInstance.Stop()
If oOutParam.ReturnValue = 0 Then
Response.Write sSQLServer & " SQL Server Stopped Successfully"
            Response.Write "Stopping of " & sSQLServer & " SQL Server Failed with error " & _
End If
set oInstance=nothing
set oOutParam=nothing

i am log in as an administrator with full rights and its giving me this error

/hostcont/zextra/untitled.asp, line 6

  • 5
  • 4
  • 3
2 Solutions
Service Pack 1 for Windows 2000 has been known to cause this error as it updates the WMI Service.

Try overwriting the winmgmt.exe file with the original (this should be here: C:\WINNT\$NtServicePackUninstall$). You will have to stop the WMI Service first.

I would suggest renaming the winmgmt.exe file to winmgmt.exe.org so if it doesn't help you can switch back easily by deleting the file and renaming the original file back to .exe.
bkniaziAuthor Commented:
from where can i get the orginall copy of winmgmt.exe or you mean the same to be overright.
When installing the service pack it creates backups of all files it overwrites

the backups are in the windows directory and have $ at the beginning and the end. I installed direct x 9b the other day and so there's a folder called $NtUninstallKB839643-DirectX9$. This contains the original files that were replaced.
The files that were replaced when applying the service pack should be in a folder called $NtServicePackUninstall$ or similar.

Alternatively you can do a search in the windows folder for winmgmt.exe and look for the one in a folder that has a $ at the beginning and end. If doing a search for the file make sure that hidden folders and system folders are included (as standard the backup folders are hidden).

Once you've found the file do this:

1. Stop the WMI service (Windows Management Instrumentation)
2. rename the winmgmt.exe file in c:\windows\system32\wbem to winmgmt.exe.org
3. Find the original winmgmt.exe file. Copy it then paste it into the c:\windows\system32\wbem folder
4. Start the WMI service

note: your windows folder may be called winnt.
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

To resolve this issue, reregister the Exchange 2000 namespace or the Exchange 2003 namespace with WMI:
Insert the Exchange 2000 CD-ROM, the Microsoft Small Business Server 2000 CD-ROM that contains Exchange 2000, or the Exchange 2003 CD-ROM, and then locate the Exwmi.mof file.
If you use the Exchange 2000 CD-ROM, run the following command, where cd-rom is the drive letter of the CD-ROM drive:
%systemroot%\system32\wbem\mofcomp.exe cd-rom:\setup\i386\exchange\exwmi.mof

this is it if your using exchange on the computer.... ;)
this is the solution if you do not use exchange , and just installed sp1...

WMI Namespace Error: When you install Service Pack 1 you may find that you get the following error: "WMI ADAP failed to connect to namespace \\.\root\cimv2\MS_809 with the following error: 0x8004100e". This appears to be a bug in SP1. You can resolve the problem by uninstalling SP1, or by replacing all the updated versions of the file winmgmt.exe on your system with the original version in the C:\WINNT\$NtServicePackUninstall$ folder and rebooting. If you have the WMI service running, you will have to stop it first in order to be able to overwrite the file. You may also wish to simply rename the original files, to avoid overwriting them: you can then reverse the operation easily if you encounter any problems.

echo off.
two answers, diffrent aproaches, whats wrong ? worried from some competition ? ;)
Your first response I have no problem with - I didn't know it could be caused by Exchange.
The second is just repeating what I said in my first reply then clarified in my second.

I don't look at EE as a competition ergo I don't get worried about competition. I use it to ask questions, and while waiting for answers I help others.

But speaking as someone who both answers and asks questions I am sure I am not the only one who finds it annoying getting an email about another reply, reading the thread to find someone has just reposted the same as someone else. It wastes everyone's time.

Also, it tends to be poor etiquette if someone is guiding someone through something and someone else steamrollers in - many people are new to using EE and often the points may not be given to those that deserve them. (Although this happens regularly through accident - this is when several people hit reply and type their answers in at the same time. This can be seen as similar posts with posting times within a few minutes of each other).

Please don't get me wrong, I'm not bitching, if you're new to EE I appologise for my curt, sarcastic response. I've just seen a lot of questions disolve into arguments over points to the point an admin has to step in.

Oh yeah, I know the second post is the same as mine because I came accross that exact same paragraph when I was searching for the answer ;)
check yourself.

1. do you want the points ?
since i do not care about them, just trying to feel usefull.
2. the second post is from the wmi FAQ didnt changed it a bit for better reference.
3. i wont bother you in this post anymore, but be aware, that if it will not be resolved,
it just becoase you missunderstood my intention : HELP THIS POOR GUY.

sometimes you can understand when someone says how the machine work,
some will need the technical sheets to understand how the machine work,
some will need the logic behind,
some will just look at it and know how it works.

supplying all the approaches is what gives the user the answer,
its a pitty you do not think the same.

next time, post the first answer in the question saying :

have a great day.
/me sighs
bkniaziAuthor Commented:
when i rename the winmgmt.exe file to winmgmt.exe.org then it will automatically create the winmgmt.exe file on the same location although i also stop the wmi services.
bkniaziAuthor Commented:
i rename the file as for your instruction but i found an error message that is:
Error type: 0x80041002
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 5
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now