Message box from Wsh on one command line

I was looking for some really simple solution how to display MessageBox like this:

From one command line in Windows Scripting host (wscript). The solution is a bit tricky, but works nice:

echo WScript.Echo “Hi” > aa.vbs && start /wait wscript /nologo aa.vbs && del aa.vbs

Advantage is that I don’t need to have prepared script to display the message and I don’t want to left anything behind.

Still, I suggest to think about using some real “not existing” file name when using this in your system.

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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s