473,382 Members | 1,750 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,382 software developers and data experts.

HELP NEEDED : Service socket and event log

Hi,

I wrote a windows service with a socket that receives files and once
a file has been received it tries to execute it.
My problem comes from execution because nothing happens.

I have checked three times path and that kind of things but still
nothing.Here is what I do in my method that analyze data :

private void ProcessClientData(String oneLine)
{
....

try
{
m_cfgFile.Close();
m_cfgFile=null;
//================================================== ======//
// Execute script files(.bat ONLY)
string strCmdLine;
string strDebug;
bool bRet = false;

strCmdLine = "/C " + DEFAULT_FILE_STORE_LOC + m_strCurFile;

System.Diagnostics.EventLog.WriteEntry("BorneAdmin ", "CmdLine=" +
strCmdLine);

System.Diagnostics.Process proc; // Declare New Process
proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;

//proc.StartInfo.UseShellExecute = false;
proc.StartInfo.FileName = "cmd.exe";
proc.StartInfo.Arguments = strCmdLine;
System.Diagnostics.EventLog.WriteEntry("BorneAdmin ","proc.Start=BEFORE");
bRet = proc.Start();
System.Diagnostics.EventLog.WriteEntry("BorneAdmin ","proc.Start=AFTER");
proc.WaitForExit();
m_clientSocket.Send(BitConverter.GetBytes(m_totalC lientDataSize));
}
....

}

When I look at logs I can see that proc.Start is execcuted.
By the way what is the equivalent function in C# of (csTmp.Format("%d",
bRet) )??? (I have started c# one hour ago but I am experienced in C++/MFC)

thnaks in advance
Nov 17 '05 #1
0 1186

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

Similar topics

0
by: Gonçalo Rodrigues | last post by:
Hi, I have a problem with threads and sockets. I'll try to describe the problem in words with pseudo-code. I've been working on a few classes to make it easier to work with threads. This...
1
by: TM | last post by:
My problem is a bit difficult to explain, having a relatively limited knowledge of .NET/C#, but please see if you can read between the lines. I have an ASPX that, on load, initiates a call to a...
4
by: BBryant | last post by:
Here is the scenario; Two sockets are bound on two seperate UDP ports, 46999 and 47000. Both sockets initilize, and are bound to the ports as expected, however only port 46999 receives data. ...
1
by: JDF | last post by:
I am fairly new to python and seem to have gotten ahead of myself. I am trying to write a Windows service that will return the current number of Citrix sessions to a client. This service will run...
5
by: Matthew Speed | last post by:
(About me: I know very little about writing server applications. I have done plenty of VB6 desktop app work but this is my first server program. I got it to work by modifying examples. I...
5
by: Andrew | last post by:
Hey all, Requesting help from the VB.Net gurus in here. I was given a task to write a Windows Service (VB.Net) that would run an external program, and if that program closed for any reason...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
6
by: half.italian | last post by:
Hi, I'm trying to serve up a simple XMLRPC server as a windows service. I got it to run properly, I'm just not sure how to stop it properly. Most of the documentation/examples I found for this...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.