Windows Services

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christopher

    #1

    Windows Services

    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.GetProc essesByName
    ("testProcessNa me")
    Dim myProcess As Process
    Dim myProcessInfo As ProcessStartInf o

    If myProcesses.Len gth = 0 Then
    Try
    myProcess = New Process
    myProcessInfo = New ProcessStartInf o

    With myProcessInfo
    .FileName = "testProcessNam e.exe"
    .UseShellExecut e = True
    .WorkingDirecto ry
    = "C:\testDir\tes tDir\"
    .Verb = "open"
    .CreateNoWindow = False
    .WindowStyle =
    ProcessWindowSt yle.Normal
    .Arguments = "arg1 arg2 arg3 arg4"
    End With

    myProcess.Start (myProcessInfo)
  • Elp

    #2
    Re: Windows Services


    "Christophe r" <donaldson@netj ets.com> wrote in message
    news:009d01c35d be$162615f0$a10 1280a@phx.gbl.. .[color=blue]
    > Good morning.[/color]

    hi,
    [color=blue]
    > 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.[/color]

    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.


    Comment

    Working...