wscript.echo without a charriage return.

Saturday, August 25th, 2012

I was writing a small script to obtain and display server network information.   Part of a project to re-ip a network.

One thing I wanted to have was formatted output and found wscript.echo was adding a carriage return to the output. I looked around to see if there was a way to disable it.

wscript.echo does this by design. There is no way to disable it.

The way to get around this is to use : Wscript.StdOut.Write

For example:

Wscript.StdOut.Write (“Enter something: “)

Wscript.StdOut.Write “You entered : ” & Wscript.StdIn.ReadLine

You will have to add is a “vbCrLf” at the end to cause a CR.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: