Re: Riddle Me This
- From: pbd22 <dushkin@xxxxxxxxx>
- Date: Fri, 11 Jan 2008 12:59:34 -0800 (PST)
What makes you think the exec is not started, is the process not visible in
the process list?
That is right.
If not, how does the program signals success/failure to
the parent process (the service in this case)?
Well, its a queue. There is no return value. We know the proccess
takes
about 2 seconds. So, it should run accordingly. If one is running when
the
other wants to run, it queues until the first one is done.
How do you start the exec, show us the code that start the exec.
Here is the code:
if (filetype = true)
{
try
{
ProcessStartInfo psi = new
ProcessStartInfo(exepath, args);
lock (_objLock)
{
if (_fProcessRunning)
{
_procq.Enqueue(psi);
psi = null;
}
_fProcessRunning = true;
}
if (psi != null)
{
StartAProcess(psi);
}
}
catch (Exception e)
{
eventLog1.WriteEntry("Error parsing file:" +
e.Message, EventLogEntryType.Error);
return;
}
}
}
void StartAProcess(ProcessStartInfo psi)
{
try
{
Process process = new Process();
process.StartInfo = psi;
process.EnableRaisingEvents = true;
process.Exited += ProcessExitedHandler;
process.Start();
}
catch (Exception e)
{
eventLog1.WriteEntry("Error with StartAProcess
method:" + e.Message, EventLogEntryType.Error);
return;
}
}
void ProcessExitedHandler(object sender, EventArgs e)
{
ProcessStartInfo psi = null;
lock (_objLock)
{
if (_procq.Count > 0)
{
psi = _procq.Dequeue();
}
else
{
_fProcessRunning = false;
}
}
if (psi != null)
{
StartAProcess(psi);
}
}
Give also some details about the exec, type of program,
VB6 application. That has been stripped of all UI "stuff".
what security and user context does it require to run in,
Can you tell me how I would find that out?
does it expect a user profile to be loaded?
No. It simply does the following:
Opens a file.
Extracts metadata.
Writes metadata to text file.
Closes file.
Thanks a ton!
Peter
.
- Follow-Ups:
- Re: Riddle Me This
- From: Willy Denoyette [MVP]
- Re: Riddle Me This
- From: pbd22
- Re: Riddle Me This
- References:
- Riddle Me This
- From: pbd22
- Re: Riddle Me This
- From: Michael C
- Re: Riddle Me This
- From: pbd22
- Re: Riddle Me This
- From: Michael D. Ober
- Re: Riddle Me This
- From: DeveloperX
- Re: Riddle Me This
- From: pbd22
- Re: Riddle Me This
- From: pbd22
- Re: Riddle Me This
- From: pbd22
- Re: Riddle Me This
- From: Willy Denoyette [MVP]
- Re: Riddle Me This
- From: pbd22
- Re: Riddle Me This
- From: pbd22
- Re: Riddle Me This
- From: Willy Denoyette [MVP]
- Re: Riddle Me This
- From: pbd22
- Re: Riddle Me This
- From: Willy Denoyette [MVP]
- Riddle Me This
- Prev by Date: Table-like (database-like) object
- Next by Date: Re: Table-like (database-like) object
- Previous by thread: Re: Riddle Me This
- Next by thread: Re: Riddle Me This
- Index(es):
Relevant Pages
|