Solved

VBSCRIPT - net send?

Posted on 2006-07-20
1
1,534 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now