473,903 Members | 6,791 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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


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

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("exit code: " + pProcess.ExitCo de.ToString());

return true;

Log.Write("NO exit");

return false;

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

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

Nov 16 '05 #2

Thanx for the hint.
"Mohamoss" <mo************ @egdsc.microsof t.com> skrev i meddelandet
news:Pb******** ******@TK2MSFTN GXA02.phx.gbl.. .
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

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...
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
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...
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();
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#"...
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....
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);
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...
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...
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...
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,...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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,...
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...
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();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
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.