How to run vbscript command from cmd

(I don't speak English. Hope you understand.)

Hi, I have the following VBS command.

set shell = CreateObject("Wscript.Shell") : shell.run "notepad"

(Start notepad, but from vbs.) I want to run this command from CMD. I can't do it like:

C:\>wscript set shell = CreateObject("Wscript.Shell") : shell.run "notepad"

I can do:

C:\>wscript script.vbs

but I must have the command in another file. I want to run it from the command prompt. How could I do it?

Thank you for the answers, Andrew

2 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like