473,770 Members | 1,980 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create Process from Service, with Currently Logged in User

I have a service which has no U/I, that I use to ensure a certain tray
application is running.

I would like for the service which runs under "Local System", to create the
process as a normal app for the user currently logged in....

Is there a way to do it.... or is there a way for a winforms app launched by
a user to communicate with a service??

How would it get a hold on the service that was running before it was and
interact with it?

Thanks,

Shane
Nov 23 '05 #1
2 2956
Yes you can communicate with a service using .NET Remoting. And you can get
the currently logged in user from your app by using this:
WindowsIdentity .GetCurrent.Nam e.ToString()

I'm not sure about getting the currently logged in user from a service.

Steve

"SStory" <no****@nospam. com> wrote in message
news:Oq******** ******@TK2MSFTN GP11.phx.gbl...
I have a service which has no U/I, that I use to ensure a certain tray
application is running.

I would like for the service which runs under "Local System", to create the process as a normal app for the user currently logged in....

Is there a way to do it.... or is there a way for a winforms app launched by a user to communicate with a service??

How would it get a hold on the service that was running before it was and
interact with it?

Thanks,

Shane

Nov 23 '05 #2
Ok. I am fairly ignorant of .NET Remoting. Do you have any samples or links
to samples of doing this?

I will also search the net for this.

thanks again,

Shane
"Steve Long" <St**********@N oSpam.com> wrote in message
news:Oo******** ******@TK2MSFTN GP12.phx.gbl...
Yes you can communicate with a service using .NET Remoting. And you can
get
the currently logged in user from your app by using this:
WindowsIdentity .GetCurrent.Nam e.ToString()

I'm not sure about getting the currently logged in user from a service.

Steve

"SStory" <no****@nospam. com> wrote in message
news:Oq******** ******@TK2MSFTN GP11.phx.gbl...
I have a service which has no U/I, that I use to ensure a certain tray
application is running.

I would like for the service which runs under "Local System", to create

the
process as a normal app for the user currently logged in....

Is there a way to do it.... or is there a way for a winforms app launched

by
a user to communicate with a service??

How would it get a hold on the service that was running before it was and
interact with it?

Thanks,

Shane


Nov 23 '05 #3

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

Similar topics

3
2217
by: Brad Jones | last post by:
Hello, I'm hoping someone can give me some help or guidance here. I'm not sure if this is even the best group to post to for this. Our OEM equipment's software architecture relies heavily on a "master" windows service. This responsibility of this service is to launch 10 or so other applications, some of which have GUI's. These applications need to be running whether somebody is logged in or not. There is no communication required between...
7
10332
by: Lalit | last post by:
Hi Friends, I have developed a Windows service. Now i need icon for this service in systray and context menu fo this icon. Can i do this? With regards, Lalit
7
8869
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I want my users to be able to select a report, click on a command button on a form, which will then automatically create the report as a pdf file and save it to the user's machine. I am using Adobe Acrobat (5.0 I think) and have Adobe Distiller as a
4
2387
by: Mrinal Kamboj | last post by:
Hi , Doubt may be bit trivial , but i wanted to know , what are the exact benefits derived while we run a background process as an NT service in windows , we can as well achieve the functionality using standalone exe , which will keep on running in a loop and do the job till been messaged to stop . Essentially , i want the key advantages of implementing process daemons as an NT Service in windows .
6
4831
by: Dde | last post by:
Hi, I am having a problem starting a process from within a web service. My code works in a console program but not from the web service. Looks like the process starts, I can see it in Taskmanager, but I connot see the window! Any help appreciated. Thanks Dominique
5
8303
by: Jason Richmeier | last post by:
The application I am currently working on contains a custom windows service. On my machine, when I logon with a domain user (non-admin) account, the user is unable to control (start and stop) the service (an access denied message is displayed). On another machine, the same user is able to control this service. This leads me to believe that this is being caused by one or more permission settings (or lack of). The first question...what...
33
11865
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course Environment.UserName returns the service logon (NT_AUTHORITY\SYSTEM). I understand that when the service starts, no user may be logged in, but that's ok, as the app I am monitoring can only be run by a logged in user. Do I need to use WMI to get the user context of Explorer.exe or is there a...
0
992
by: sigsik | last post by:
Hi, I'd like to run an executable process without the need to be logged on to the computer. that is why i want to run it as a window service. The executable opens a form (ui) that does not require the user interaction. it simply for me to use AxControl to manipulate visio diagrams. Since this requires me to interact with desktop i have to run the service as local system and enable the 'allow interact with desktop' checkbox....
0
2158
by: thephatp | last post by:
Is there any possible way to get the currently logged in (active) user from within a service? I need the service to start at runtime. I need to capture log on / log off / switch user events. I haven't gotten to that yet, but it IS possible from within a windows service, correct? I figured I'd ask because of my current problem. Line of code in question: System.Security.Principle.WindowsIdentity.GetCurrent().Name From within an...
0
9618
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10038
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8933
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.