How can one run a vbs command from cmd when the command is not saved?
For example to run a powershell command which has not been saved one can simply use
powershell "get-childitem", where
get-childitem is the command we want to use. We do not need to save a powershell file to run the command.
Let’s say we want to run the vbs command
Wscript.Echo Date() without saving a vbs file first, how can we do that?
I’m not looking to do this from a .bat file. I really am looking to embed a vbs script in a node.js script. I realize that this is not heavily reflected in the questions title :-/ I want to use exec and embed the vbs. It’s important that there’s no files other than the one js.
If I could run the vbs command from the cmd console without the use of any files then I could run the command from node.js without the need for any other files.
I don’t think Is it possible to embed and execute VBScript within a batch file without using a temporary file? answers this as it’s concerning using a batch file.