Windows Script Host Error Cannot Find Script File In Windows 10
Windows Script Host error Can not find the specified file which occurs in Windows operating systems.
And we will also analyze the causes of this error and what should be done to prevent such errors from occurring in the future.
So that it is immediately clear what kind of mistakes we are going to talk about now, let’s look at the window with this error.
The name and path to the script file can be different, it all depends on the developer’s imagination, the script name can be a simple, incomprehensible set of letters or disguised as a system file.
So that you think that this is the way it is, in this case – “C: \ ProgramData \ SystemService.vbs ” . The operating system in this case, most likely.
Loads normally, but it happens that during the loading of the operating system a similar error appears and that’s all, the desktop does not start. This refers to such errors as – “Could not find the script file C: \ Windows \ run.vbs.”
Today I will show how to fix the error in both cases. But first, let’s talk about the causes of these errors.
Table of Contents
Windows Script Host Error
What Cause Unable To Find Specified File ?
From the information that is displayed in the error window, we understand that the system is trying to run a certain WSH script (Windows Script Host).
At the same time, the system cannot find it, which means that it was deleted, moved, in general, it is not.
Now there are questions, why do you need this script? And by whom was it removed?
The fact that this script no longer exists is actually not bad, since this script is part of the virus that was on your system, most likely it was deleted by the antivirus program.
It’s your fault that a virus got into the system, since such viruses infect your computer after certain actions, for example.
You downloaded music in exe format and launched this file or other similar actions that could endanger your computer ( visiting questionable sites and downloading the same data ).
Note! There are other reasons for the appearance of errors of Windows Script Host, but they are less common, in this material we are talking about errors associated with malicious scripts.
What To do so that such errors do not appear?
Since we found out that such an error is a consequence of the presence of a virus in the system, the actions that need to be done to prevent such errors from occurring are connected with the prevention of computer infection by viruses.
What you need for this:
- Availability of anti-virus software with up-to-date databases, i.e., It must be constantly updated. It is also necessary to periodically run a full computer scan for viruses. If you do not want to pay for an antivirus, you can also use free options; for a home computer, they are actually not so bad.
- In most cases, the computer is run on behalf of an account with administrative rights. But this is wrong, as administrator rights are only needed to perform administrative tasks, in some cases, it may not be very convenient for you, but most viruses need administrator rights in order to do what they were designed for. And if you work with administrator rights, then for viruses these are ideal conditions, as they can easily install something, change the system settings, and so on. Therefore, it is recommended to work on behalf of the user account, and use administrator rights if necessary ( you just need to create a separate user account and work on its behalf );
- You should not visit questionable sites, download files whose format does not correspond to their purpose, for example, as I said music in exe format, as you understand, audio files in this format cannot be. This also applies to games, i.e., No need to download games from unverified sources. In other words, this item means being a bit more careful when using the Internet and trying to download some data.
If you perform at least the above actions, then the virus will not have much fewer opportunities to infect your computer, and, accordingly, the errors that we consider in this article will not appear.
Resolving an error when the desktop is available
If your system boots and then an error occurs, i.e. You see the desktop and start menu, then most likely the script is called by the Windows Task Scheduler.
For example, the error “Can not find the script file C: \ ProgramData \ SystemService.vbs” is the effect of the virus that the scheduler just used to run the script.
There are other ways to launch such malicious scripts, this is autoload, and group policies, but they are less common; now, probably, no one puts their own malware or scripts into autoload now.
So, in order to eliminate the error, we need to figure out how the script is launched, as I said, we start looking in the task scheduler. To do this, run it, click ” Start Menu -> in the search, write Task Scheduler ”
Then we have a little difficulty, we need to find the task that ran the script and delete it. It is not necessary to delete everything in a row, so before deleting.
Make sure that on the “ Actions ” tab in the line the launch of the program is exactly the path that the error shows us, i.e., in our case, this is “C: \ ProgramData \ SystemService.vbs.”
I advise you to immediately start your search by viewing the list of active tasks and the launch history of these tasks.
If the log of all tasks is turned off, then turn it on and reboot, then after the error appears, go back to the schedule, where you can see the name of the most recently completed tasks.
The task may be located in a separate section, and this section may be disguised as a system one, but not quite, for example, the “Windows” section, as you see, there is an error in the title (two letters s), so check this directory immediately.
After you have found the necessary task or tasks, you can safely delete it, then reboot, after which the error should disappear.
If you did not find the task, you could do the actions described below (i.e., check the registry).
Troubleshoot when the desktop does not start
In this case, you turn on the computer, and you get an error, while you do not see the desktop.
These errors include an error – “Can not find the script file C: \ Windows \ run.vbs”.
In this case, the virus worked with the registry, namely, it changed the system startup parameters.
In order to eliminate this error, you must start the registry editor and restore the default settings. Let’s start the desktop first, for this:
- Press the key combination ctrl + alt + del;
- Select the item ” Run Task Manager “;
- In the menu, click ” File -> New Task (Run …) “;
- In the open field, enter ” explorer.exe.”
After that, the desktop will start.
Now run the registry editor. To do this, click ” Start -> enter in the search regedit.”
Then we find the section
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Winlogon for 32 bit systems
or
HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Microsoft \ Windows for 64-bit.
And check the Shell and Userinit settings. Their values must be equal to “explorer.exe” and “C: \ Windows \ system32 \ userinit.exe,” respectively.
If the values are different, change them to the default values, to do this, simply call the change parameter window ( double-click or right-click to change ) and enter the desired value. Then you reboot, and the error should disappear.
I have it all, if you encounter this kind of error and eliminate it in some other way, share the solution with others in the comments. Until!