There is this common issue on Windows where users get the message “Windows Script Host error The system cannot find the file specified” on startup due to an error associated with a .vbs script.
Your PC was likely infected with malware, and Windows Defender deleted the malicious vbs file, but not the script to run it at startup, so your PC automatically generates this error message whenever trying to run that .vbs file.
To fix this issue, we will use a Microsoft tool called Autoruns to delete the entry causing this error message:
- Download Autoruns on the Microsoft page.
- Unzip the file. then right-click on Autoruns64 and select Run as administrator:
- Click yes to allow this app to make changes to your device.
- On Autoruns quick filter, type vbs.
- Right-click on the (Not Verified) entry under Task Scheduler that has the same Image Path as the path shown in your error message, then click on Delete:
- Reboot your PC.
This will fix the issue once and for all.
Since this error was caused by malware, you should run a Malware scan now. This is the next step to make sure that your PC is safe.
Run a Malware Scan to Fix Windows Script Host the System Cannot Find the File Specified
While Windows Defender is a powerful antivirus itself, I recommend you run Malwarebytes alongside it. Malwarebytes is the most powerful anti-malware solution, and it allows you to scan your PC whenever needed.
Now, we will use Malwarebytes to scan your PC for any remaining traces of Malware:
- Download Malwarebytes and install it on your PC.
- With Malwarebytes open, click on the Scan button and wait while it scans your PC for malware:
- Quarantine any suspicious files.
To ensure you run Windows and Defender and Malwarebytes without conflicts, read my article: can you run Windows Defender and Malwarebytes simultaneously?
Conclusion
To fix the Windows Script Host error “The system cannot find the file specified code 80070002” on startup, you need to download the Autoruns utility, type vbs in the quick filter, and delete the (Not Verified) entry using the Task Scheduler.
Since malware caused this error, you should also run a Malwarebytes scan to ensure your PC is free from other harmful stuff.
If you get the notification “1 app is using your microphone” whenever you start Windows, check this article on how to fix rundll32.exe and svchost.exe using my microphone.