Re: Process.Start() in windows service on Windows Server 2003, problem
From: Pavel Lebedinsky (m_pll)
Date: 02/23/05
- Next message: Rhett Gong [MSFT]: "RE: Decryption using private key from cert store failing with err"
- Previous message: Steve Patrick: "Re: Can not set IssuerName/SerialNumber in AKI extention in Win2003"
- In reply to: Tobias Johansson: "Re: Process.Start() in windows service on Windows Server 2003, problem"
- Next in thread: Tobias Johansson: "Re: Process.Start() in windows service on Windows Server 2003, problem"
- Reply: Tobias Johansson: "Re: Process.Start() in windows service on Windows Server 2003, problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 22 Feb 2005 22:34:50 -0800
So it looks like the process starts successfully but then terminates
for some reason. May be it doesn't like the service environment
or something like that.
You could try configuring the service to run as System and enabling
the "allow to interact with desktop" checkbox. Then you should be
able to see your process window while it's running. If it goes away
too quickly change the command line to something like
"cmd /k test.cmd" and put the actual command in the test.cmd file.
Another option is to run your process under the built in debugger
(ntsd.exe) to see if you're getting any exceptions. You'll need to use
the -server and -remote options to connect to the debugger session
(unless you change your service to be interactive as described above).
"Tobias Johansson" wrote:
> I tested with notepad before and it worked,
> but I can't actually see it because the program is running as a windows
> service.
>
> However I tried it again today with the same result.
> I also tried with ipconfig.exe and it worked without problem
> and I got the output of my ip configuration in my log file.
>
> I also corrected the deadlock issue,
> to read the stream before exit. Thanks pointing that out.
>
> I know win 2003 server has extra security on running exe files mapped on
> network drives
> but this is not on a mapped drive, it's local.
> But coul'd it be related ? but then console program wouldn't have worked
> either...?
>
> I have also tried setting the current work dir of the service to the work
> dir where the exe is
> before executing it .. no change..
>
> I have also checked the permissions on the file
> and that the user that the service runs as has access to it (currently as
> local admin just to make it work)
- Next message: Rhett Gong [MSFT]: "RE: Decryption using private key from cert store failing with err"
- Previous message: Steve Patrick: "Re: Can not set IssuerName/SerialNumber in AKI extention in Win2003"
- In reply to: Tobias Johansson: "Re: Process.Start() in windows service on Windows Server 2003, problem"
- Next in thread: Tobias Johansson: "Re: Process.Start() in windows service on Windows Server 2003, problem"
- Reply: Tobias Johansson: "Re: Process.Start() in windows service on Windows Server 2003, problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]