473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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?
Nov 17 '05 #1
3 1470
Jacek Jurkowski wrote:
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?


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
Nov 17 '05 #2
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.

--
in**@dowhileloop.com
http://www.dowhileloop.com web development
http://publicjoe.dowhileloop.com -- C# Tutorials

"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:OA**************@TK2MSFTNGP12.phx.gbl...
Jacek Jurkowski wrote:
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?


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

Nov 17 '05 #3
Landi wrote:
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.

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

"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:OA**************@TK2MSFTNGP12.phx.gbl...
Jacek Jurkowski wrote:
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?


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

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Logan | last post by:
Several people asked me for the following HOWTO, so I decided to post it here (though it is still very 'alpha' and might contain many (?) mistakes; didn't test what I wrote, but wrote it - more or...
4
by: Josef Sachs | last post by:
Is Andrew Kuchling's regex-to-re HOWTO available anywhere? I've found the following (dead) links on various Web pages: http://py-howto.sourceforge.net/regex-to-re/regex-to-re.html...
4
by: Ray Dukes | last post by:
What I am looking to do is map the implementation of interface properties and functions to an inherited method of the base class. Please see below. ...
4
by: Marco Meoni | last post by:
Hi. I read the Gordon McMillan's "Socket Programming Howto". I tried to use the example in this howto but this doesn't work. The code is class mysocket: '''classe solamente dimostrativa -...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.