Windows Services

C

Christopher

Good morning.
I have developed a Windows Service and it is currently
working on Windows XP. I tried to move this service to
Windows 2000 Advanced Server and the serice installs and
starts up properly but won't execute the programs it was
designed to do. Are there any inherit differences between
implementing services on Win XP and 2000 Server? Here is a
snippet of code I am using. Thanks for any help you may be
able to provide.

Dim myProcesses As Process() = Process.GetProcessesByName
("testProcessName")
Dim myProcess As Process
Dim myProcessInfo As ProcessStartInfo

If myProcesses.Length = 0 Then
Try
myProcess = New Process
myProcessInfo = New ProcessStartInfo

With myProcessInfo
.FileName = "testProcessName.exe"
.UseShellExecute = True
.WorkingDirectory
= "C:\testDir\testDir\"
.Verb = "open"
.CreateNoWindow = False
.WindowStyle =
ProcessWindowStyle.Normal
.Arguments = "arg1 arg2 arg3 arg4"
End With

myProcess.Start(myProcessInfo)
 
E

Elp

Christopher said:
Good morning.
hi,

I have developed a Windows Service and it is currently
working on Windows XP. I tried to move this service to
Windows 2000 Advanced Server and the serice installs and
starts up properly but won't execute the programs it was
designed to do.

just an idea : according to your code snippet, your service is launching an
standard windows application and i guess that this application doesn't show
up on the screen. Have you checked that the "interact with desktop" property
of your service has been set ? I may be the source of your problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top