Skip to content
TheChatArchiveThe Chat Archive
Mistralmistral-medium-2505· Mistral AIHugging Face LMArena Human Preference 140K

why this command don't work? mshta…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Claudeclaude-sonnet-4-20250514’s answer.
  1. User

    why this command don't work? mshta vbscript:createobject("shell.application").shellexecute("taskkill.exe","/IM","explorer.exe","/f","","open",0)(close)

  2. Mistral Assistant

    The command you provided is a VBScript one-liner executed via mshta to forcefully terminate the explorer.exe process. However, there are a few potential issues that could cause it to fail:

    Possible Reasons Why It Doesn't Work:

    1. Syntax Error in the Command:

      • The taskkill command syntax is incorrect. The /IM (Image Name) and /F (Force) flags should be grouped together.
      • The correct syntax for taskkill is:
        taskkill /IM explorer.exe /F
        
      • Your command splits /IM and /F into separate arguments, which is invalid.
    2. mshta Execution Context:

      • mshta is typically used to execute HTA (HTML Application) files or VBScript snippets, but it may not handle complex command-line arguments well.
      • The ShellExecute method may not properly pass the arguments to taskkill.exe.
    3. Permissions:

      • Killing explorer.exe requires administrative privileges. If you're not running the command as an administrator, it may fail silently.
    4. explorer.exe Restart Behavior:

      • Windows automatically restarts explorer.exe after it is killed, so you might not notice any effect unless you observe the process list.

    Corrected Command:

    If you want to use mshta to run this, the correct syntax should be:

    mshta vbscript:CreateObject("Shell.Application").ShellExecute("taskkill.exe", "/IM explorer.exe /F", "", "", 0)(window.close)
    

    Or more simply, just run:

    taskkill /IM explorer.exe /F
    

    directly in Command Prompt (as admin).

    Alternative Methods:

    1. Using cmd Directly:

      taskkill /IM explorer.exe /F
      

      (Run as Administrator.)

    2. Using PowerShell:

      Stop-Process -Name explorer -Force
      
    3. Using a VBScript File: Save this as kill_explorer.vbs and run it:

      Set shell = CreateObject("Shell.Application")
      shell.ShellExecute "taskkill.exe", "/IM explorer.exe /F", "", "", 0
      

    Why Your Original Command Failed:

    • The /IM and /F flags were split into separate arguments, which taskkill does not recognize.
    • The mshta method is not the most reliable way to execute command-line tools with arguments.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.