0

hi all,
i m trying with DOS commands. the command 'msg' works very well in windows xp. but when i tried the same in windows 7 home basic, it gives an error. can anybody please tell me why does this happens? is there any alternative command for it? or how can we display a msgbox in windows 7?

Attachments 123.png 20.88 KB
4
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by caperjack
0

msg is not compatible command with win7 home basic,you would need to upgrade your win7 version to use that command ,your other alternative would be to use a messenger program like windows messenger

0

Copy the following code into a file named msgbox.vbs. Display a message from the
command prompt by:

C:\> msgbox "my message"
C:\> msgbox "my message" "my title"

If you want multiple lines then include \n as in

C:\> msgbox "this\nhas\nfour\nlines" "My Message Box"

set arg = Wscript.Arguments

select case arg.Count
    case 0
        Wscript.Echo ""
        Wscript.Echo "Display a message box with the given text and (optional) title"
        Wscript.Echo "\n in text will skip to a new line"
        Wscript.Echo ""
        Wscript.Echo "Usage:"
        Wscript.Echo ""
        Wscript.Echo "    msgbox text [title]"
        Wscript.Echo ""
        Wscript.Quit
    case 1
        prompt = arg(0)
        title  = "Message Box"
    case 2
        prompt = arg(0)
        title  = arg(1)
end select

prompt = Replace(prompt,"\n",vbCrLf)

msgbox prompt,vbOKOnly,title
2

To send a message to another user on the network you could try the "net send" command although I do not know if this available in your version of Windows.

Votes + Comments
offset negative rep
0

if you want to use msg in dos command make sure that the both messenger in services is enable..

0

if you want to use msg in dos command make sure that the both messenger in services is enable..

there is no msg cmd in basic win7

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.