Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 945679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:47:28+00:00 2026-05-15T22:47:28+00:00

I am trying to kill all instances of a process called AetherBS.exe but the

  • 0

I am trying to kill all instances of a process called “AetherBS.exe” but the following VBscript is not working. I am not exactly sure where/why this is failing.

So how can I kill all process of “AetherBS.exe?”

CloseAPP "AetherBS.exe"

Function CloseAPP(Appname)
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
    Set colItems = objWMIService.ExecQuery( _
        "SELECT * FROM Win32_Process", , 48)
    For Each objItem In colItems
        If InStr(1,Ucase(objItem.Name),Appname) >= 1 Then
            objItem.Terminate
        End If
    Next
End Function
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T22:47:28+00:00Added an answer on May 15, 2026 at 10:47 pm

    The problem is in the following line:

    If InStr(1,Ucase(objItem.Name),Appname) >= 1 Then
    

    Here you convert the Win32_Process.Name property value to uppercase, but don’t convert the Appname to uppercase. By default, InStr performs a case-sensitive search, so if the input strings are the same but differ in case, you won’t get a match.

    To fix the problem, you can convert Appname to uppercase as well:

    If InStr(1, UCase(objItem.Name), UCase(Appname)) >= 1 Then
    

    or you can use the vbTextCompare parameter to ignore the letter case:

    If InStr(1, objItem.Name, Appname, vbTextCompare) >= 1 Then
    

    However, there’s actually no need in this check at all as you can incorporate it directly in your query:

    Set colItems = objWMIService.ExecQuery( _
        "SELECT * FROM Win32_Process WHERE Name='" & Appname & "'", , 48)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I kill all my postgresql connections? I'm trying a rake db:drop but
So James Patterson keeps trying to hack my website! Okay, not really, but he
I am trying to kill a process in the command line for a specific
I'm trying to kill (on a demand) all the python processes that are running
I'm trying to kill a long running PHP process on the Mac (Lion), running
I'm trying to get clojure/emacs/swank/cake all working together. According to assembla I need 'cake
I am having a hell of a time trying to write a kill all
I'm trying to find all the open excel workbooks and kill one particular one.
I am trying to get crash dump debugging working with 2010, but it keeps
I'm trying to use jQuery to change the value of button.kill . However I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.