Share via

How to Fix Windows Script Host error

Drowsy 0 Reputation points
2026-03-05T16:54:07.07+00:00

Hello all, for awhile now ive had a windows script error pop up everytime i open my pc. ive tried to watch videos to deal with the problem but nothings worked.

Line: 3

Char: 7

Error: the system cannot find the file specified ( neither can i )

code: 80070002

source: null

please help me if you can.

Must appricated

have a good day.

Windows for home | Other | Performance and system failures
0 comments No comments

2 answers

Sort by: Most helpful
  1. David-M 109.6K Reputation points Independent Advisor
    2026-03-05T19:19:01.6866667+00:00

    Hi. I'm David, and I'm happy to help you.


    Please do the following:

    Download the Autoruns tool from the link below.

    https://download.sysinternals.com/files/Autoruns.zip

    Extract the ZIP file. Then, right-click the "Autoruns64" file and select "Run as Administrator".

    Wait for the tool to scan your computer and, in the filter box in Autoruns, type the name or path of the file that appears in the error message.

    (If you are unable to identify the file name or path, please share a screenshot of the error. Use the shortcut "Windows + Shift + S" to use the screenshot tool.)

    Share a screenshot of what is found.


    I await your reply.

    0 comments No comments

  2. Q&A Assist
    2026-03-05T16:54:22.7033333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error indicates that a script is being called at startup, but the referenced file no longer exists. The goal is to find and remove or fix that startup entry, and then repair any damaged system files.

    1. Check for corrupted system files
      1. Open an elevated Command Prompt (Run as administrator).
      2. Run:
              sfc /scannow
        
      3. Wait for the verification to reach 100% and note the result:
        • If it reports that corrupt files were found and repaired, restart the PC and see if the Windows Script Host error still appears.
        • If it reports that corrupt files were found but some could not be fixed, follow the manual repair guidance in the reference article (view the CBS.log, identify the file, and replace it with a known good copy).
    2. Manually replace any corrupted system file (only if SFC reports unrepairable files) After identifying a specific corrupted file from the CBS.log:
      1. Take ownership of the file:
              takeown /f <Path_And_File_Name>
        
      2. Grant Administrators full access:
              icacls <Path_And_File_Name> /grant administrators:F
        
      3. Copy a known good version over it:
              copy <Source_File> <Destination>
        
      4. Restart the PC and test again.
    3. Remove the broken script from startup If the error persists after SFC:
      1. Press Ctrl+Shift+Esc to open Task Manager.
      2. Go to the Startup tab.
      3. Look for any entries that reference .vbs, .js, or “Windows Script Host” and disable them.
      4. Also check:
        • Settings → Apps → Startup (on Windows 10/11) for similar entries.
        • The Startup folders:
          • %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup
          • %PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\Startup Delete any shortcut that points to a missing script.
    4. Check Task Scheduler
      1. Press Win+R, type taskschd.msc, press Enter.
      2. Look under Task Scheduler Library (and subfolders) for tasks that run wscript.exe, cscript.exe, or a .vbs/.js file.
      3. If a task points to a non‑existent script path (matching the error you see), disable or delete that task.
    5. If system instability remains If there are still repeated script errors or other issues after cleaning startup and scheduled tasks and running SFC, consider a repair/reset of Windows while keeping files (Reset this PC → Keep my files) as described in the referenced articles.

    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.