How do I Install and run a program as a new service to client machines?

N

Nicole

Hi

I need to install a new service to the client machines in our windows 2000
network, the service should start running at start up and should 'survive' a
log on/off.

I have seen the 'services' snap-in and noticed that they are applied to a
profile, but I'm not sure if this is either relevant or the correct path to
be taking. Do I add the program to be run as a service to the list and then
apply it to a profile? If this is the case can someone point me in the
direction of how to add to list? Or should I be creating an msi for the
program and assigning it to a group of computers?

Thanks for any advice/help given
 
A

Ace Fekay [MVP]

In
Nicole said:
Hi

I need to install a new service to the client machines in our windows
2000 network, the service should start running at start up and should
'survive' a log on/off.

I have seen the 'services' snap-in and noticed that they are applied
to a profile, but I'm not sure if this is either relevant or the
correct path to be taking. Do I add the program to be run as a
service to the list and then apply it to a profile? If this is the
case can someone point me in the direction of how to add to list? Or
should I be creating an msi for the program and assigning it to a
group of computers?
Thanks for any advice/help given

Look in the Resource Kit for "srvany". You can create a service from any app
with that thing.


--
Ace

This posting is provided "AS-IS" with no warranties or guarantees and
confers no rights.

If this post is viewed at a non-Microsoft community website, and you were to
respond to it through that community's website, I may not see your reply
unless that website posts replies back to the original Microsoft forum.
Therefore, please direct all replies ONLY to the Microsoft public newsgroup
this thread originated in so all can benefit or ensure the web community
posts it back to the original forum.

Ace Fekay, MCSE 2003 & 2000, MCSA 2003 & 2000, MCSE+I, MCT, MVP
Microsoft MVP - Windows Server Directory Services
Microsoft Certified Trainer
Infinite Diversities in Infinite Combinations.
=================================
 
B

Brandon McCombs

Nicole said:
Hi

I need to install a new service to the client machines in our windows 2000
network, the service should start running at start up and should 'survive' a
log on/off.

I have seen the 'services' snap-in and noticed that they are applied to a
profile, but I'm not sure if this is either relevant or the correct path to
be taking. Do I add the program to be run as a service to the list and then
apply it to a profile? If this is the case can someone point me in the
direction of how to add to list? Or should I be creating an msi for the
program and assigning it to a group of computers?

Thanks for any advice/help given

Is this a service you wrote or you bought and want to install? If it is
a real service then it will survive a logoff/logon due to the very
nature of how a service works. Services are defined in the registry so
mucking with that will be required. HKEY LOCAL
MACHINE/System/CurrentControlSet/Services
 
N

Nicole

Hi

It has been written by a colleague in Delphi, I believe it has been written
as a service, it uses several service related function calls () from
advapi32.dll.

Unfortunately my experience of services is from win 98se. Basically I used
to write my installation routines so they added an entry to
HKEY_LOCAL_MACHINE\software\microsoft\windows\CurrentVersion\runServices
Registry entry with the name of the program. My code used to call
RegisterServiceProcess from KERNEL32.DLL and that was it.

I'm now trying to get up to speed on writing and installing services for
windows2000/xp, and not sure where to start! I don't want to have to log
onto each client machine in order to install the service, so I'm hoping it
can be done via group policy or similar, but I struggling to find
information.

So do I create an msi installation package that sets a value in the
HKEY LOCAL MACHINE/System/CurrentControlSet/Services key? Can I then assign
the package to a group of machines? If its assigned to a machine will it
automatically execute at boot?

Many thanks for the help
N
 
A

Ace Fekay [MVP]

In
Nicole said:
Hi

It has been written by a colleague in Delphi, I believe it has been
written as a service, it uses several service related function calls
() from advapi32.dll.

Unfortunately my experience of services is from win 98se. Basically I
used to write my installation routines so they added an entry to
HKEY_LOCAL_MACHINE\software\microsoft\windows\CurrentVersion\runServices
Registry entry with the name of the program. My code used to call
RegisterServiceProcess from KERNEL32.DLL and that was it.

I'm now trying to get up to speed on writing and installing services
for windows2000/xp, and not sure where to start! I don't want to have
to log onto each client machine in order to install the service, so
I'm hoping it can be done via group policy or similar, but I
struggling to find information.

So do I create an msi installation package that sets a value in the
HKEY LOCAL MACHINE/System/CurrentControlSet/Services key? Can I then
assign the package to a group of machines? If its assigned to a
machine will it automatically execute at boot?

Many thanks for the help
N

Nicole, as I mentioned, srvany will do this for you. Have you looked into
it?

Here are some links on how to do it including EXACTLY what to do in the
registry:

How To Create a User-Defined Service
http://support.microsoft.com/kb/q137890/

This resource kit tool lets you run any program as a service. Mark Minasi
explains how the tool works.
http://www.windowsitpro.com/Articles/Index.cfm?ArticleID=7959&DisplayTab=Article

and where to download it from (if you haven't found it yet at
www.microsoft.com/downwith pictures documented on how to use srvany:

Install and Run as SrvAny Service, SrvAny with download links (including how
to use the installer tool called 'InstSrv' to integrate into an application
installer for any apps you have developed that you want to install it as an
app:
http://www.iopus.com/guides/srvany.htm

Ace
 

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

Similar Threads


Top