Start and exit applcation(s) using Windows Services

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to create Windows Services that executes other applications
(batch files), checks for newer versions (placed to a specific folder) and
terminates them by demand (or as scheduled or as new version arrives)?

It seems that first part - execute application is easier than the last one.

Any answer would be appreciated.
 
Hi Serge

It is possible to execute a exe, batch etc. from a windows service,providing
interact with the desktop is switched on and with a valid user account
(admin privileges)


I am not sure about what you mean by terminating ?

You can terminate a process (exe, batch etc.) from within your windows
service as well (Security restrictions apply). See SystemDiagnostics.Process
class for more on that

You don't need to execute any external applications, unless those
application functionality cannot be duplicated in the service itself.

The "recommendation" is not to execute any other applications from your
service, but life is not always perfect

Hope this helps
Henk
 
Thanks
Alex

I'll follow your link-advice

Alex Passos said:
Take a look at the Process class in .NET it has functionality for process
control. Here is a link from MSDN to get you started, the section "Managing
Processes" has samples on starting, binding, and stopping processes:

http://msdn.microsoft.com/library/d...y/en-us/vbcon/html/vbtskstartingprocesses.asp

(to execute other applications)
(to terminate processed on demand)
(checks for new versions is outside the scope of process handling)

Alex Passos
 
Hi Henk

Unfortunately my clients need whole (and instantly growing) bunch of
monitoring and data processing applications with UI, so they could manage
various parameters like workflow folders, emergency data redirection: DB
IP’s, database types and names; delay/repeat times, and other custom options
they need.

They also want to know exactly how many monitoring applications are
currently running on "their servers", what they (apps.) are doing (and it
must be shown in UI in text boxes, etc.)

They can-NOT start of terminate this applications, but they are able to
pause them (for a while).

We started development with pure Windows Services indeed but our client’s
expertise and necessary features mentioned above gave us no choice but
working with "something" with UI.

They definitely are not interested in downloading, installation and starting
of new (or new versions) applications. They are demanding background "full
automation".

So one Windows Service starting, “killing†and auto-updating all
applications placed onto specific folder would be an optimal solution I guess.
 
Back
Top