Solved

VBSCRIPT - net send?

Posted on 2006-07-20
1
1,542 Views
Last Modified: 2009-12-16
Hi
Im using Win 2K Pro (not sure if that matters) but I try to do this in a .vbs file and it seems to open a command prompt real quick and then not do a netsend at all.

If I do
cmd
net send pc024 test
I do get a message

But not with my code below.

Set objShell = Wscript.CreateObject("WScript.Shell")
Comp2Reach = pc024
Message2Send = "test"
objShell.Run "net send " & Comp2Reach & " " & Message2Send

Thank!
0
Comment
Question by:hmcgeehan
1 Comment
 
LVL 25

Accepted Solution

by:
Lee Savidge earned 20 total points
ID: 17144938
Hi,

Doesn't this:

Comp2Reach = pc024

need to be this:

Comp2Reach = "pc024"

I am guessing that the Comp2Reach is a string?

Regards,

Lee
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
RSS Feeds--IE 13 185
PHP parse error 7 61
 shows up in Outlook, not OWA or on phone 3 71
How to replace a token in a string with square brackets? 2 75
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question