473,396 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

net send - cmd.exe fails to initialize

Hi all,

Am trying to run a message service using net send via our intranet -
basically the user selects the poeple on the network who they want to
send a message to from a drop-down list on a form and on submit a loop
is run - here's a snippet of the code (inside a for loop)

<% elseif Request.Form("recipients")(a) <> "" then %>
<% NamUsr = CStr(Request.Form("recipients")(a)) %>
<% server_shell.Run "%comspec% /c net send " & NamUsr & " FROM " &
username &":" & Msg %>

(Note : I create the server_shell object outside the loop and set it
to nothing when the loop has finished - also username is basically
Server Variable Logon User)

The problem happens when all users are selected - it sends it to a few
people and then bombs out and then i get a load of application errors
- cmd.exe or net.exe failed to initialize on the server.

yet when tested for smaller numbers of users it runs fine - any ideas?

TIA
grif
Jul 19 '05 #1
1 3041
Probably because you are spawning so many copies of cmd.exe. Try write out a
..bat file with all of the net send commands in it. Then run the batch file
so that only one instance of cmd.exe has to be created.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"roisin" <gr***********@hotmail.com> wrote in message
news:de**************************@posting.google.c om...
Hi all,

Am trying to run a message service using net send via our intranet -
basically the user selects the poeple on the network who they want to
send a message to from a drop-down list on a form and on submit a loop
is run - here's a snippet of the code (inside a for loop)

<% elseif Request.Form("recipients")(a) <> "" then %>
<% NamUsr = CStr(Request.Form("recipients")(a)) %>
<% server_shell.Run "%comspec% /c net send " & NamUsr & " FROM " &
username &":" & Msg %>

(Note : I create the server_shell object outside the loop and set it
to nothing when the loop has finished - also username is basically
Server Variable Logon User)

The problem happens when all users are selected - it sends it to a few
people and then bombs out and then i get a load of application errors
- cmd.exe or net.exe failed to initialize on the server.

yet when tested for smaller numbers of users it runs fine - any ideas?

TIA
grif

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: www.douglassdavis.com | last post by:
lets say i have a class class Thing { function __construct($string) { // initialize by string } }
4
by: jas | last post by:
I have a basic client/server socket situation setup....where the server accepts a connection and then waits for commands. On the client side, I create a socket, connect to the server...then I...
1
by: Steve | last post by:
Please take a look at the simple code segment below and advise me what is wrong. According to the help and examples I've seen it should work unless I misunderstand something. The problem is...
6
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
12
by: keepyourstupidspam | last post by:
Hi, I am writing a windows service. The code runs fine when I start the service when my machine is running but it fails to start automatically when the machine reboots. The code bombs out when...
2
by: Michael D. Reed | last post by:
I am using ClickOnce to distribute a program. It works well except for one detail. When a new version is installed, the program does not initialize properly immediately after the update. The...
6
by: comp.lang.php | last post by:
I am using session_start() on index.php and for some reason sometimes it'll fail. No warnings, no errors, no notices, not even after prepending error_reporting(E_ALL) and ini_set('display_errors',...
7
by: oopsbabies | last post by:
Hello everyone, I am using Apache 1.3.33 as the web server and PHP version 4.3.10. My machine is using Windows XP 2002 professional edition which comes with a Windows firewall. I am using McAfee...
4
by: gurufordy | last post by:
Hello. Trying to use the ASP.net user functionality but it keeps failing on me. I have created a login and registration page for my site. When you fill in the registration form it should send a...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.