Computing.Net > Forums > Programming > Batch File and Start->Run...

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch File and Start->Run...

Reply to Message Icon

Name: infinitiy
Date: December 26, 2003 at 09:58:45 Pacific
OS: XP
CPU/Ram: P3 w/512MB
Comment:

Recently we changed the names of our computers. Doing this made net send harder. I am trying to write a batch file that can be run from the Start->Run... menu item by typing:
send mike here is the message
where send is the name of the batch file
mike is the name of the recipient
here is the message is the message
so far I have:
@echo off
goto top

:top

%1

if "%1%" == "mike" goto Mike
if "%1%" == "ryan" goto Ryan
if /I "%1%" == "end" goto end

:Mike
SET VAR=TEMPTEXT
SET %VAR%=%2 %3 %4 %5 %6 %7 %8 %9
net send MW10074 %TEMPTEXT%
goto end

:Ryan
SET VAR=TEMPTEXT
SET /P %VAR%="Text to send: "
net send MW10022 %TEMPTEXT%
goto end

:end

Right now my max message length is 8 words as denoted by the %2 %3 etc. I'd like it to be as unlimited as net net send.
(Ryan is just a second variable I used for this program, and from another program where you are prompted. version 1)
Thank you!



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch File and Start->Run...

Batch file to start and stop servic www.computing.net/answers/programming/batch-file-to-start-and-stop-servic/15882.html

Make an exe with a batch file and.. www.computing.net/answers/programming/make-an-exe-with-a-batch-file-and/17595.html

i created a batch file and i'm invoking three www.computing.net/answers/programming/i-created-a-batch-file-and-im-invoking-three/19013.html