web analytics

How to Suppress the Copyright Information When Runing a VBScript Program?

Options

davegate 143 - 921
@2016-01-08 19:33:38

When you run the following script:

'Test.vbs

Option Explicit
Main

Sub Main
Wscript.Echo "Hello World!"
end sub

With the follwing command line:

C:\>cscript /nologo test.vbs

Your output will look something like this:

Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

Hello World!

You'll see information about the version of Windows Script Host running on your machine, and then the obligatory copyright information from Microsoft. If you don’t need to see this every time you run a script, you can suppress this information from the display by starting your script like this:

C:\> cscript test.vbs //nologo

Now when you run your script your output will look like this:

Hello World!

Comments

You must Sign In to comment on this topic.


© 2024 Digcode.com