473,402 Members | 2,064 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,402 software developers and data experts.

Process.Start() in windows service on Windows Server 2003, problem

Hello,

I'm having what I believe a security problem
to execute an executable file from a windows service
in windows server 2003.

It works fine in WIN XP SP2

The program(the service) itself just continues as if nothing where wrong
after process.Start is executed and I get an Exit code from the process
and HasExited is true, however in the process list in taskmanager i don't
see the process when it starts.
no exception is caught

When I run the same code on a console program (on Win 2003) everything works
just fine.

The Process I'm trying to start is unmanaged code made in Cobol.

Code is on latest Framework 2.0 Beta (2.0.41115)

Any help is greatly appreciated
Best Regards
Tobias

Code:
try
{
System.Diagnostics.ProcessStartInfo psi = new
System.Diagnostics.ProcessStartInfo(@"D:\Program\M yProgram\ExtExp.exe");

psi.RedirectStandardOutput = true;

psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;

psi.UseShellExecute = false;

psi.Arguments = "#DEF
\"C:\\Program\\MyService\\Exp\\Def\\ExtExpWRFA.def \"";

System.Diagnostics.Process pProcess;

pProcess = System.Diagnostics.Process.Start(psi);

Log.Write("started");

System.IO.StreamReader myOutput = pProcess.StandardOutput;

pProcess.WaitForExit(5000);

if (pProcess.HasExited)
{
Log.Write("exited");

string output = myOutput.ReadToEnd();

Log.Write("out:--"+output);

Log.Write("exit code: " + pProcess.ExitCode.ToString());

return true;

}
else
{
Log.Write("NO exit");

return false;
}

}
catch (Exception ex)
{
Log.Write("Exp:" + ex.Message);
return false;
}


Nov 16 '05 #1
2 3172
hi
i think this problem is best posted to one of the platfromsdk or
windows2003 newsgroups

Nov 16 '05 #2
Hi

Thanx for the hint.
"Mohamoss" <mo************@egdsc.microsoft.com> skrev i meddelandet
news:Pb**************@TK2MSFTNGXA02.phx.gbl...
hi
i think this problem is best posted to one of the platfromsdk or
windows2003 newsgroups

Nov 16 '05 #3

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

Similar topics

0
by: Stephan Lux | last post by:
Hi all, I have developed a windows service with Visual Basic .NET which starts a file conversion tool via the commandline. The tool open the files (z.B. Word, Excel, Acrobat...) and prints them...
7
by: Yosh | last post by:
I am developing an application that will stop and start a process on a remote machine. What security rights are needed for my application to be able to do this? Hope this makes sense. Yosh
5
by: Paul Bergson | last post by:
I have been trying to get a process to start up and run with arguments passed to it. I have gotten close (Thanks to help from this board) but I there is a failure while I'm running this because...
6
by: kk | last post by:
hello to all, I want to call an exe file on other system(on the same LAN)though a webservice(by placing the dll).For that i use the following code in C#...... Process ps = new Process();...
11
by: Kirk | last post by:
The following C# web service works fine until you uncomment the lines setting UserName and Password. Then the process starts as the specified user, but hangs in a suspended state. In fact, any...
0
by: Kirk | last post by:
The following C# web service works fine until you uncomment the lines setting UserName and Password. Then, Process.Start throws an Access is Denied Exception. This is with .NET 2.0, of course...
6
by: uuyytt | last post by:
I have a Windows service from which I want to start Internet Explorer with a particular URL as an argument. I don't know why my code (shown below) doesn't work. I know that IExplore.exe starts as I...
4
by: =?Utf-8?B?VkIgSm9ubmll?= | last post by:
I am at my witless end here, please help! I have an ASP.Net aspx web page, hosted on Windows Server 2003, that receives a query string with the path to an autocad drawing file selected from a...
4
by: Brian Gideon | last post by:
I'm having a problem with the amount of time it takes to initialize an application pool on IIS 6.0. Upon the first request to an ASP.NET page the worker process (w3wp.exe) starts up. The problem...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.