solve error please

Posted on 2004-08-23
Last Modified: 2010-08-05
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

Question by:bkniazi
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3

Expert Comment

ID: 11869313
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 so if it doesn't help you can switch back easily by deleting the file and renaming the original file back to .exe.

Author Comment

ID: 11869435
from where can i get the orginall copy of winmgmt.exe or you mean the same to be overright.

Accepted Solution

JagC earned 100 total points
ID: 11869745
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
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.
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 11869804
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.... ;)

Assisted Solution

wonderdementic earned 100 total points
ID: 11869815
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.


Expert Comment

ID: 11869826

Expert Comment

ID: 11869883
echo off.
two answers, diffrent aproaches, whats wrong ? worried from some competition ? ;)

Expert Comment

ID: 11870235
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 ;)

Expert Comment

ID: 11870409
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.

Expert Comment

ID: 11870479
/me sighs

Author Comment

ID: 11878146
when i rename the winmgmt.exe file to then it will automatically create the winmgmt.exe file on the same location although i also stop the wmi services.

Author Comment

ID: 11878331
i rename the file as for your instruction but i found an error message that is:
Error type: 0x80041002

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question