Howto ...

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

    Howto ...

    Run a Process using current user login?

    I hava a service that works as LocalSystem
    and i'm running some Process but I would
    Like to run it as an current logged user or
    admin even? How to obtain current user info?


  • Hans Kesting

    #2
    Re: Howto ...

    Jacek Jurkowski wrote:[color=blue]
    > Run a Process using current user login?
    >
    > I hava a service that works as LocalSystem
    > and i'm running some Process but I would
    > Like to run it as an current logged user or
    > admin even? How to obtain current user info?[/color]

    You can run the service as a specific user (see the properties
    of the service, tab LogOn).

    I don't think you can find out a "currently logged on user",
    because that service runs even if no-one is logged in, or when
    multiple users are logged on (server, WinXP with 'fast user switching')

    Hans Kesting


    Comment

    • Landi

      #3
      Re: Howto ...

      Hans is right,
      That service will start at windows start up. The service will be started by
      the time the user has the chance to even log on.
      I think that services always run with admin rights, if you give it the right
      credentials, so you really don't have to do anything there.

      --
      info@dowhileloo p.com
      http://www.dowhileloop.com web development
      http://publicjoe.dowhileloop.com -- C# Tutorials

      "Hans Kesting" <news.2.hansdk@ spamgourmet.com > wrote in message
      news:OAIekrmRFH A.3704@TK2MSFTN GP12.phx.gbl...[color=blue]
      > Jacek Jurkowski wrote:[color=green]
      > > Run a Process using current user login?
      > >
      > > I hava a service that works as LocalSystem
      > > and i'm running some Process but I would
      > > Like to run it as an current logged user or
      > > admin even? How to obtain current user info?[/color]
      >
      > You can run the service as a specific user (see the properties
      > of the service, tab LogOn).
      >
      > I don't think you can find out a "currently logged on user",
      > because that service runs even if no-one is logged in, or when
      > multiple users are logged on (server, WinXP with 'fast user switching')
      >
      > Hans Kesting
      >
      >[/color]


      Comment

      • Hans Kesting

        #4
        Re: Howto ...

        Landi wrote:[color=blue]
        > Hans is right,
        > That service will start at windows start up. The service will be
        > started by the time the user has the chance to even log on.
        > I think that services always run with admin rights, if you give it
        > the right credentials, so you really don't have to do anything there.
        >[/color]

        A service runs by default under the "System" account. This has FULL
        right on the local system, but NO rights on the network.

        Hans Kesting
        [color=blue]
        >
        > "Hans Kesting" <news.2.hansdk@ spamgourmet.com > wrote in message
        > news:OAIekrmRFH A.3704@TK2MSFTN GP12.phx.gbl...[color=green]
        >> Jacek Jurkowski wrote:[color=darkred]
        >>> Run a Process using current user login?
        >>>
        >>> I hava a service that works as LocalSystem
        >>> and i'm running some Process but I would
        >>> Like to run it as an current logged user or
        >>> admin even? How to obtain current user info?[/color]
        >>
        >> You can run the service as a specific user (see the properties
        >> of the service, tab LogOn).
        >>
        >> I don't think you can find out a "currently logged on user",
        >> because that service runs even if no-one is logged in, or when
        >> multiple users are logged on (server, WinXP with 'fast user
        >> switching')
        >>
        >> Hans Kesting[/color][/color]


        Comment

        Working...