473,795 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Diagnost ics.ProcessStar tInfo psi = new
System.Diagnost ics.ProcessStar tInfo(@"D:\Prog ram\MyProgram\E xtExp.exe");

psi.RedirectSta ndardOutput = true;

psi.WindowStyle = System.Diagnost ics.ProcessWind owStyle.Hidden;

psi.UseShellExe cute = false;

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

System.Diagnost ics.Process pProcess;

pProcess = System.Diagnost ics.Process.Sta rt(psi);

Log.Write("star ted");

System.IO.Strea mReader myOutput = pProcess.Standa rdOutput;

pProcess.WaitFo rExit(5000);

if (pProcess.HasEx ited)
{
Log.Write("exit ed");

string output = myOutput.ReadTo End();

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

Log.Write("exit code: " + pProcess.ExitCo de.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 3206
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.microsof t.com> skrev i meddelandet
news:Pb******** ******@TK2MSFTN GXA02.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
1587
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 over an image printer driver to tiff-files. On my Windows XP client it works fine, but on the target system (Windows 2003 Server) some issues occured: My first release uses the framework process class to start the application. As a standalone...
7
717
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
2075
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 the c:\bin\xcacls starts nothing happens. How can I see output from the console i was trying to get the ProcessStartInfo.RedirectStandardOutput Property to work but even if I got the system to process it I didn;t know where the output was being...
6
14204
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(); ps.StartInfo.FileName = exeFilePath ps.StartInfo.Arguments = arguments; ps.Start();
11
13476
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 executable will exhibit this problem; it is not specific to whoami.exe. This is with .NET 2.0, of course (1.1 does not support running a process as a different user). This appears to be a bug. Can anyone comment? <%@ WebService Language="C#"...
0
6749
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 (1.1 does not support running a process as a different user). I'm running everything on Windows Server 2003. I have impersonation enabled in my web.config, and I'm using Integrated authentication on the IIS virtual directory that this aspx is in....
6
6491
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 can see it in my task manager, but it is not visible. Can anyone explain what is happening? My code: Process p = Process.Start("IExplore.exe", m_strURL);
4
2874
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 web page hosted on a unix driven file server. The user wants to have this file converted to a pdf. My page takes the query string and turns it into a windows unc path, then I copy the file down to the web server and place it into a directory. This...
4
3234
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 in my case is that it takes more than 5 minutes to begin servicing requests after the initial startup. During that agonizingly long period the process is doing nothing...and I mean absolutely nothing...0% CPU and no memory movement at all. And...
0
9673
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9522
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10217
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10167
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10003
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6784
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5566
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2922
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.