Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Have question about running a script


  • Please log in to reply
7 replies to this topic

#1 herbman

herbman

  • Members
  • 416 posts
  • OFFLINE
  •  
  • Local time:06:48 AM

Posted 12 February 2017 - 10:42 PM

I am trying to run a script that seems to fix a WMI error (event ID 10) but i am sure i am misunderstanding it , do i copy the entire blue outlined script as one or is there just a section i am supposed to copy ?

 

 

Thank you very very much.

 

 

 

 

To resolve the issue, run a script to stop the Event ID 10 messages. To run the script follow these steps:

1) In Notepad create a new document named Workaround.txt

2) Copy the following script into notepad

strComputer = "."

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\subscription")

Set obj1 = objWMIService.ExecQuery("select * from __eventfilter where name='BVTFilter' and query='SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA ""Win32_Processor"" AND TargetInstance.LoadPercentage > 99'")

For Each obj1elem in obj1

set obj2set = obj1elem.Associators_("__FilterToConsumerBinding")

set obj3set = obj1elem.References_("__FilterToConsumerBinding")

For each obj2 in obj2set

WScript.echo "Deleting the object"

WScript.echo obj2.GetObjectText_

obj2.Delete_

next

For each obj3 in obj3set

WScript.echo "Deleting the object"

WScript.echo obj3.GetObjectText_

obj3.Delete_

next

WScript.echo "Deleting the object"

WScript.echo obj1elem.GetObjectText_

obj1elem.Delete_

Next




3) Save the text as Workaround.vbs

4) Close Notepad

5) Open an elevated command prompt

a. Click on start

b. Click on Programs

c. Right-Click on Command Prompt

d. Choose run as administrator

6) Change Directory to the one containing workaround.vbs: ( Example CD c:\users\%username%

7) Run cscript workaround.vbs

 

 

 

 

 

 


BC AdBot (Login to Remove)

 


#2 bwv848

bwv848

    Bleepin' Owl


  • BSOD Kernel Dump Expert
  • 3,023 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:92.96 million miles away from the sun
  • Local time:07:48 AM

Posted 12 February 2017 - 10:47 PM

I see that you followed a Microsoft article. Yes, copy everything in blue, or everything in the code box (for your convenience):
strComputer = "."

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\subscription")

Set obj1 = objWMIService.ExecQuery("select * from __eventfilter where name='BVTFilter' and query='SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA ""Win32_Processor"" AND TargetInstance.LoadPercentage > 99'")

For Each obj1elem in obj1

set obj2set = obj1elem.Associators_("__FilterToConsumerBinding")

set obj3set = obj1elem.References_("__FilterToConsumerBinding")

For each obj2 in obj2set

WScript.echo "Deleting the object"

WScript.echo obj2.GetObjectText_

obj2.Delete_

next

For each obj3 in obj3set

WScript.echo "Deleting the object"

WScript.echo obj3.GetObjectText_

obj3.Delete_

next

WScript.echo "Deleting the object"

WScript.echo obj1elem.GetObjectText_

obj1elem.Delete_

Next

Edited by bwv848, 12 February 2017 - 10:48 PM.

If I do not reply in three days, please message me.
 
BC BSOD Posting Instructions | Carrona BSOD Index | Driver Reference Table (DRT)


#3 herbman

herbman
  • Topic Starter

  • Members
  • 416 posts
  • OFFLINE
  •  
  • Local time:06:48 AM

Posted 12 February 2017 - 10:55 PM

Thank you very much , yes it is from an MS site . 



#4 bwv848

bwv848

    Bleepin' Owl


  • BSOD Kernel Dump Expert
  • 3,023 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:92.96 million miles away from the sun
  • Local time:07:48 AM

Posted 12 February 2017 - 11:00 PM

You're welcome! :)


If I do not reply in three days, please message me.
 
BC BSOD Posting Instructions | Carrona BSOD Index | Driver Reference Table (DRT)


#5 herbman

herbman
  • Topic Starter

  • Members
  • 416 posts
  • OFFLINE
  •  
  • Local time:06:48 AM

Posted 12 February 2017 - 11:28 PM

I'm back , i should inform all of you that i live " Murphy's law" and if something can go wrong it does in my case, there's never any exceptions .

 

 

So what went wrong this time , Command prompt keeps telling me that Workaround .vbs is not something it recognizes , it recognizes it for everybody else on the planet it just doesn't recognize it in my case.

 

 

OK , confused about the below , if you open an elevated command prompt there is no click on "start" & click on " programs "  you happen to already be in an elevated command prompt   , then it tells you to right click on command prompt again and run as administrator ,  why would i do that,   as far as i know i am already in command prompt and an administrator.  Nothing comes easy for me folks.

 

 

5) Open an elevated command prompt

a. Click on start

b. Click on Programs


c. Right-Click on Command Prompt

d. Choose run as administrator

6) Change Directory to the one containing workaround.vbs: ( Example CD c:\users\%username%


Edited by herbman, 12 February 2017 - 11:29 PM.


#6 bwv848

bwv848

    Bleepin' Owl


  • BSOD Kernel Dump Expert
  • 3,023 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:92.96 million miles away from the sun
  • Local time:07:48 AM

Posted 13 February 2017 - 10:11 AM

I'll re-write the instructions for you. :thumbup2:

• Press and hold the Windows Key + R on your keyboard at the same time.
• In Run, type in notepad and hit enter.
• Copy and paste the following into Notepad:

strComputer = "."

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\subscription")

Set obj1 = objWMIService.ExecQuery("select * from __eventfilter where name='BVTFilter' and query='SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA ""Win32_Processor"" AND TargetInstance.LoadPercentage > 99'")

For Each obj1elem in obj1

set obj2set = obj1elem.Associators_("__FilterToConsumerBinding")

set obj3set = obj1elem.References_("__FilterToConsumerBinding")

For each obj2 in obj2set

WScript.echo "Deleting the object"

WScript.echo obj2.GetObjectText_

obj2.Delete_

next

For each obj3 in obj3set

WScript.echo "Deleting the object"

WScript.echo obj3.GetObjectText_

obj3.Delete_

next

WScript.echo "Deleting the object"

WScript.echo obj1elem.GetObjectText_

obj1elem.Delete_

Next

• When finished, click File, then Save.... Under Save as file type: select All Files (*.*) and save the file as fixme.vbs to your desktop. YOU MUST SAVE IT AS A .VBS FILE!!!
• Close off Notepad.
• Open Start, and in the Search programs and files box, type cmd.
• Right-click on cmd.exe, select Run as administrator, and accept any User Account Control prompts.
• Enter the following commands:

cd %userprofile%\desktop
fixme.vbs

• You're all set! :)


Edited by bwv848, 13 February 2017 - 10:13 AM.

If I do not reply in three days, please message me.
 
BC BSOD Posting Instructions | Carrona BSOD Index | Driver Reference Table (DRT)


#7 herbman

herbman
  • Topic Starter

  • Members
  • 416 posts
  • OFFLINE
  •  
  • Local time:06:48 AM

Posted 13 February 2017 - 02:50 PM

Wow, you have no idea how much i truly appreciate your time and help with this , thank you , thank you , thank you .

 

People like you are what makes life worth living for complete idiots like myself and when i say i really am this stupid i mean it , no joke .

 

Thanks again friend.



#8 bwv848

bwv848

    Bleepin' Owl


  • BSOD Kernel Dump Expert
  • 3,023 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:92.96 million miles away from the sun
  • Local time:07:48 AM

Posted 13 February 2017 - 03:45 PM

You're most welcome!


If I do not reply in three days, please message me.
 
BC BSOD Posting Instructions | Carrona BSOD Index | Driver Reference Table (DRT)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users