VBS file

How can I run VBS file I windows 10? By default it's opening in Notepad. Running with wscript I get error "There is no script engine for file extension .vbs".
LVL 7
8046586Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tom CieslikIT EngineerCommented:
You can run scripts with the Windows-based script host in the following ways:
By browsing in Windows
Browse to the folder containing the script you want to run and double-click it. Script files can be listed in My Computer, Windows Explorer, the Find window, the Start menu, or on your desktop.
By using the Run command
Click Start, and then click Run. In Open, type the name of the Windows Host executable file (Wscript.exe), followed by a space, then the full path name of the script you want to run. Be sure to include the file name extension of the script file. Click OK to start the script.
From a command prompt window
At the command prompt, type the name of the Windows Host executable file (Wscript.exe), followed by a space, then the full path name of the script you want to run. Be sure to include the file name extension of the script file. Press Enter to start the script.

for example

RUN/SEARCH

Wscript.exe  script.VBS
0
8046586Author Commented:
Hi Tom, I tried to sublimate your explanation in one sentence in my question. I am doing exactly the same you say and it pops up an error.
0
NVITEnd-user supportCommented:
Is your antivirus possibly blocking it?
0
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

Lee W, MVPTechnology and Business Process AdvisorCommented:
so whats the error? post a screen shot.

you can also run cscript to execute from a command line - cscript yourscript.vbs
0
Tom CieslikIT EngineerCommented:
Turn OFF you antivirus for second and try again.
0
8046586Author Commented:
Antivirus off. cscript or wscript is the same error message. RUN and CMD
0
Lee W, MVPTechnology and Business Process AdvisorCommented:
What happens when you run WSCRIPT or CSCRIPT with NO script specified?
0
Lee W, MVPTechnology and Business Process AdvisorCommented:
Let’s follow these methods & check if the issue persists:

Method 1
a. Type ‘cmd’ in Start, Run box. Right click on cmd in the Program list and then select the option Run as Administrator.
b. Type the following command, and then press ENTER on the keyboard:
cscript.exe //H:WScript

Method 2

You may re-register the vbscript.dll file:
a. Type ‘cmd’ in the Start, Run box, right-click on Command Prompt, click on Run as Administrator.
b. Type ‘Regsvr32 <space> vbscript.dll’.
c. Click the OK button.

Above from https://answers.microsoft.com/en-us/windows/forum/windows_xp-performance/error-there-is-no-script-engine-for-file-extension/ef023588-0c5c-4d37-a169-20eedb9c5a4c?auth=1
0
Tom CieslikIT EngineerCommented:
“wscript.exe” is Windows Script Host which is a default program to open “.vbs” file types.

Let’s follow these methods & check if the issue persists:

Method 1
a. Type ‘cmd’ in Start, Run box. Right click on cmd in the Program list and then select the option Run as Administrator.
b. Type the following command, and then press ENTER on the keyboard:
cscript.exe //H:WScript

Method 2

You may re-register the vbscript.dll file:
a. Type ‘cmd’ in the Start, Run box, right-click on Command Prompt, click on Run as Administrator.
b. Type ‘Regsvr32 <space> vbscript.dll’.
c. Click the OK button.

Another solution might be to reassociate the vbs files with the following command:
assoc .vbs=VBSFile

Hope the information helps.
0
Isha RIkhiData Recovery ExpertCommented:
Hi Nick if you are still facing the issue then follow the steps mentioned below.I have read it in some community and resolved the same issue faced by me a few days back-
"You can run scripts with the Windows-based script host in the following ways:
By browsing in Windows
Browse to the folder containing the script you want to run and double-click it. Script files can be listed in My Computer, Windows Explorer, the Find window, the Start menu, or on your desktop.
By using the Run command
Click Start, and then click Run. In Open, type the name of the Windows Host executable file (Wscript.exe), followed by a space, then the full path name of the script you want to run. Be sure to include the file name extension of the script file. Click OK to start the script.
From a command prompt window
At the command prompt, type the name of the Windows Host executable file (Wscript.exe), followed by a space, then the full path name of the script you want to run. Be sure to include the file name extension of the script file. Press Enter to start the script.
"
0
8046586Author Commented:
Unfortunately, nothing of the above solutions works for me. Wnem I am trying to associate the file type .vbs with wscript.exe I am getting another error "The program you have selected cannot be associated with this file type. Please choose another program."
0
8046586Author Commented:
I found a workaround to run the VBS files, but the solution probably is windows reinstallation.

Workaround:
Run CMD as Administrator

C:\windows:\system32>wscript.exe //E:vbscript <file location\file name.vbs>

Thanks everyone for your support.
0
Lee W, MVPTechnology and Business Process AdvisorCommented:
This site works best when you work with us and communicate what is happening.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
8046586Author Commented:
Problem solved
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 10

From novice to tech pro — start learning today.