Re: 2nd opinion? - Windows service app development

Tech-Archive recommends: Fix windows errors by optimizing your registry



I would say you'd be better off running under the account of least
privelege, as long as your service will still work. Is there any reason
you'd need LocalSystem privs (i.e. higher even than an administrator)?

I would configure a custom action in the installer so that it automatically
grants LocalService access to the directory it watches, and run it under
that. Search the MS webby for a description of the privs granted to
LocalService also, you might find there's something in there that's too
restrictive, but I doubt it.

There are very few apps these days that genuinely need Admin privs to run,
let alone anything higher, but your best option is to research and find out
exactly what you need.

-Alex


"B. Chernick" <BChernick@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:287BA440-8E76-4EE8-937E-42EFCF1F4DE1@xxxxxxxxxxxxxxxx
I have not touched a Windows Service app since my MCAD certs (about 5 years
ago...) I've just been assigned to write a quickie app. I could use a
2nd
opinion here.

The app is to be written in Dot Net 2.0 (VB). Probably all it will do is
monitor a directory (at intervals controled by a timer), do some stuff
with
text files, and ftp text files to an ftp. I believe I've successfully
tested
most of the techniques I'll be using but I was wondering about the status
of
the ServiceProcessInstaller's Account setting. 'LocalSystem' seems to
works
fine. "LocalService' works fine as well, if I give 'Local Service' full
access to the directory.

So I suppose my question is, given the above, should I prefer using
"LocalSystem" or "LocalService"? (Are there any 'gotchas' with either in
a
situation like this?)



.



Relevant Pages

  • Re: service question
    ... The use of the SERVICE.H header file and the accompanying SERVICE.C file ... There is no need to modify the code in SERVICE.C. ... The second option is to use the ATL COM App Wizard in MSVC 6 and ... Services should run as LocalService or LocalSystem and they should run on ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Running a Python Service under the LocalService or NetworkService Account
    ... not want this service to run under a user account. ... to be able to run as a LocalService, NetworkService and the like. ... it is possible to specify that the service should run using ...
    (comp.lang.python)
  • Re: 7023 - Windows Time Service - Not all privileges referenced are assigned to the caller
    ... blank it'll fill the password in for you, then if you've given LocalService ... > Event Source: Service Control Manager ... > The Windows Time service terminated with the following error: ... > "The account specified for this service is different from the account ...
    (microsoft.public.windows.server.general)
  • Re: Using the registry in Vista.
    ... account name and so my service and executable run in the LocalService ... HKEY_LOCAL_MACHINE for the registry. ... Non-elevated programs are not allowed to write to HKLM. ...
    (microsoft.public.vc.mfc)
  • SP1
    ... adding the "localservice" to the domain policy doesn't solve the ... I tried also to change the account for the w32time service to the ...
    (microsoft.public.windows.server.general)