Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: how to run a service as system with user account?

  1. #1

    how to run a service as system with user account?

    hi all,

    i've created a service for my virusscanner, which i want to run at startup.

    When i log in as administrator it is no problem to start the service: "net start virusscan"

    but when i log in as the normal account (user) i get an access denied message...

    is there a solution to this? i want to start the service automatically but without changing the useraccount to an admin....


    grtz

  2. #2
    AO Ancient: Team Leader
    Join Date
    Oct 2002
    Posts
    5,197
    Two thoughts come immediately to mind......

    First, doesn't your AV have an option to "Start with Windows"? What AV is it?

    Secondly, and the reason I won't appear too helpful 'cos I'm not sure what you have done is that a service starts when Windows starts. Thus it is started prior to the login event and as such shouldn't give an error message to the screen other than "a service failed to start" and point you to the event log where, sometimes, a more useful message will appear. Have you looked in there for any clues? Is the error message as stated above?

    [Lightbulb]

    When you say at startup..... did you put a shortcut to the AV in your startup folder or did you create a service in the registry and put the appropriate parameters in there?

    [/Lightbulb]
    Don\'t SYN us.... We\'ll SYN you.....
    \"A nation that draws too broad a difference between its scholars and its warriors will have its thinking done by cowards, and its fighting done by fools.\" - Thucydides

  3. #3
    Senior Member
    Join Date
    Apr 2004
    Posts
    1,130
    if it is a service and has the "AUTO START" as property, there is no reason to you start it by line command. And yes, normal user cant touch services. That is why exist security (at least) on Windows. Install as a service is totally diferent of put it on startup folder.
    Meu sítio

    FORMAT C: Yes ...Yes??? ...Nooooo!!! ^C ^C ^C ^C ^C
    If I die before I sleep, I pray the Lord my soul to encrypt.
    If I die before I wake, I pray the Lord my soul to brake.

  4. #4
    i've created the service since the service is running as system, otherwise the virusscanner wouldn't be able to scan the complete hdd since i've restricted some areas.....

    as for the error: i get no message at startup, but it isn't running either, but when i try to start it manually using the admin account it works, but using the user account i get the access denied error....


    b.t.w. as for startup, perhaps thats my problem since i've only created the service and put the startup type on automatically, but haven't made any changes to the registry myself...

    could this be the problem? if so, where should i make the changes?

  5. #5
    AO Ancient: Team Leader
    Join Date
    Oct 2002
    Posts
    5,197
    I'd still like to know what AV it is and why it doesn't seem to have the option to start it with Windows.

    What did you do, (the entire process would help), to create the service?

    What are your event logs saying under system? It's possible that the program simply won't run as a service, (there are some large differences in the way it should be programmed for it to be able to run as a service rather then a simple executable so you can't always create a service from a regular appp.
    Don\'t SYN us.... We\'ll SYN you.....
    \"A nation that draws too broad a difference between its scholars and its warriors will have its thinking done by cowards, and its fighting done by fools.\" - Thucydides

  6. #6
    Senior Member
    Join Date
    Apr 2004
    Posts
    1,130
    err...
    just tell us: what is antivirus name? does it have a installation process to install as service?
    if u put it as a service by yourself, u can get a lot of errors, such as prereq services are missing, etc
    Meu sítio

    FORMAT C: Yes ...Yes??? ...Nooooo!!! ^C ^C ^C ^C ^C
    If I die before I sleep, I pray the Lord my soul to encrypt.
    If I die before I wake, I pray the Lord my soul to brake.

  7. #7
    I'd still like to know what AV it is and why it doesn't seem to have the option to start it with Windows
    it's called avg6.0 and it is started with windows, but is not able to test the files in the restricted areas on the hdd, however, if it would run as system, it would have that possibility....

    i've created the service with instsrv.exe using the command: "instsrv virusscanner c:\avg\avg.exe" (perhaps the name of executable isn't correct here, but it is at my home system and i'm at work now )
    then i typed services.msc and clicked on the service.
    here i said: interact with the desktop and that's all....

    just tell us: what is antivirus name? does it have a installation process to install as service?
    if u put it as a service by yourself, u can get a lot of errors, such as prereq services are missing, etc
    if i use msconfig to make sure it doens't get started and start the service as described above manually, the virusscanner works fine, so it must be possible to make sure that the service is started at windows startup, question is how?

  8. #8
    AO Ancient: Team Leader
    Join Date
    Oct 2002
    Posts
    5,197
    Sounds like you may have installed the AV in a context lesser than administrator thus it can't scan where it is supposed to because you would effectively have elevated your priviledges to be able to do so. If this is the case try uninstalling it and reinstalling it as an administrator. That should grant the service the appropriate rights.
    Don\'t SYN us.... We\'ll SYN you.....
    \"A nation that draws too broad a difference between its scholars and its warriors will have its thinking done by cowards, and its fighting done by fools.\" - Thucydides

  9. #9
    Senior Member
    Join Date
    Apr 2004
    Posts
    1,130
    I can be wrong, but i believe that AVG was designed to start as:
    HKLM\Software\Microsoft\CurrentVersion\Run\AVGCC32.exe. No support for services is provided by Grisoft.

    Some programs have problems to install as services. Although u have marked that service as "interact with Desktop", some failure is still occuring at startup (Obvious - u told us that)
    Could u post here event log related messages about AVG startup?

    U can also mark this program (running at startup folder) to run as another user, such as Administrator. Did u try that?
    Meu sítio

    FORMAT C: Yes ...Yes??? ...Nooooo!!! ^C ^C ^C ^C ^C
    If I die before I sleep, I pray the Lord my soul to encrypt.
    If I die before I wake, I pray the Lord my soul to brake.

  10. #10
    Antionline Herpetologist
    Join Date
    Aug 2001
    Posts
    1,165
    Ummm.... the AVG service runs as system. At least on my comp it does. Try reinstalling as an administrator.
    Cheers,
    cgkanchi
    Buy the Snakes of India book, support research and education (sorry the website has been discontinued)
    My blog: http://biology000.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •