When you connect to the computer, if you see a message box with an error message saying Unable to find script file In Windows 10, this message could point you in the right direction to fix the problem. Windows users usually see it when they log in.
How To Fix Unable to Find Script File in Windows 10
Windows uses script files to run many programs on Windows. Many of them are set to run as soon as you connect to the computer, while others may be based on a trigger. That said, generally speaking, Windows-defined scripts do not fail, and it is likely that some malware has configured a script to run. However, since it was deleted from the computer, the file is missing and starting Windows gives an error. This error can also occur after an incomplete uninstall. Although the file has been deleted, the scheduled script or trigger remains. Here are the steps you can take to resolve the issue-
- Check the ownership of this script
- Reinstall the program
- Correction of the Winlogin entry via the registry
- Correct the .vbs entry in the registry
- Run an antivirus scan.
1]Does this script file belong to you?
The error message may appear as – Unable to find script file or Unable to execute.vbs. That said, there is one thing I want you to be sure of before I go ahead and fix it.
Is the error message box showing script file path or any file? If yes, you need to determine if this has been configured or installed by you. If you have configured a macro to run at startup, or have a program that did it when you configured it, it would be best to correct it using the original method.
Usually these script files are available in the startup folder or run using the Task Scheduler. I strongly suggest that you browse them if you cannot find your custom script.
You should also check if the file is related to a program that you recently uninstalled.
Lily: Cannot find the HPAudioswitchLC.vbs script file at startup.
2]Reinstall the program
If you can identify the program with which the missing file is associated. I suggest you reinstall the program and see.
If it is a Windows operating system file, run the System File Checker.
Lily: The system cannot find the specified file.
2]Using Registry Editor to Correct the Winlogon Entry
Open the Registry Editor by typing regedit at the Run prompt, then pressing the Enter key.
Go to the following path in the editor
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon
Locate the channel userinitand double click to edit it
The default value for the string is “C: Windows system32 userinit.exe, ” if there is anything else, make sure to change it and click the OK button.
Log out and log back in to check if the error is now gone.
3] Run.vbs error
If you receive a Windows script host error, you must set the default value for the vbs key.
You will need to use Registry Editor to change the value
ComputerHKEY_CLASSES_ROOT.vbs
Follow our detailed guide to fix the Windows Script Host error.
You can also check if access to the Windows scripting host is disabled on your computer.
Lily: Unable to find the script file run.vbs at login
4]Recreate the missing files
If you are unable to find which program calls this file and have tried everything, I suggest that you recreate the file and see what happens.
- Note the path and navigate to it using File Explorer
- If other folder structures are also missing, you will need to create them
- Once you have created the blank file, wait for it to be called by the program
- If nothing happens, you are ready.
If the app is legitimate, I’m sure you’ll see the associated error again, giving you information about what didn’t work. Sometimes we end up using a garbage cleaner, and the software deletes the files thinking it is a junk file.
4]Run Antivirus
Although it is not necessary, if the script file does not belong to you, then make sure that the system is no longer compromised; it is best to run antivirus software only once. You can use any antivirus solution or the built-in Windows security software to analyze and remove the problem.
We hope something here will help you.