Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


solve error please

Posted on 2004-08-23
Medium Priority
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 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.

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 300 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 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.
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


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 300 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 winmgmt.exe.org 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

597 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