Friday, 17 June 2011

Message box for user from a DOS prompt

Approach 1:
Works in Windows XP onwards:
msg * "Hello, Cruel World!"

Approach 2:
works in Windows NT, 2000, XP. Doesn't work in Vista onwards, requires messenger windows service to be running:
net send %USERNAME% "Blah"

Approach 3:
1) Create a file messagescript.vbs:
<script type="text/vbscript">
MsgBox "your text here"
</script>

2) Run the commandwscript /nologo messagescript.js

No comments:

Post a Comment