to create the vbscript file you need an simple editor.
The source code can be saved in a simple text file with the ending .vbs. The .vbs file can be executed directly.
z.B.: in Windows Explorer klick the right mouse key: "New Text dokument" und myfirstbatch.vbs as the Name of your script.
(important here: in explorer the following Option should be set: "Tools, Folder Options, View, Hide extensions for known file types" otherwise you save namederbatchdatei.vbs.txt! and the file is not executable)
a Vbscript text output works as follows:
wscript.echo "Output text"
You can start your script by simply clicking on it, or via Command Line by executing the following command cscript vbsdatei.vbs
or wscript vbsdatei.vbs
at cscript: all Textoutputs are displayed in the Command Prompt, wscript opens a Window for each Output,
so for testing cscript is the better choice, as it is simpler to stop the script in case of an error.
Examplevideo:
you can redirect all Outputs to Windows with the following Scriptcommand
MsgBox "Contents of the window",0,"Name of the window"
It should be noted that the 0, determines the appearance of the resulting window.