Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

New Process in WinXP

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ahmed Perlom - 24 Feb 2006 15:42 GMT
Hi all,

I want to create a window system service that sits on the background and
just fire another service/executable (i.e, notepad) every time a new user
fast switches to a new session.  How can I start a new process in another
user sessions in WinXP using .NET 1.1 or 2.0?  also how can detect the event
of user fast switch to a new session?

thanks in advance...
Dmytro Lapshyn [MVP] - 27 Feb 2006 11:42 GMT
Hi Ahmed,

As for user logon/logoff events, you can use System Event Notification
Manager (see MSDN docs on the ISensLogon and ISensLogon2 interfaces). As for
running a process as a user, you can probably use the CreateProcessAsUser
API, but I am not sure how do you obtain the logged on user's token.

> Hi all,
>
[quoted text clipped - 5 lines]
>
> thanks in advance...
Ahmed Perlom - 28 Feb 2006 22:06 GMT
Thanks Dmytro.

The user identity might not be important to me. I wonder if there is nay
security constraints that a local system service could start another
executable whenever another user logins or fast switch to a session? Do you
think ignoring the user identity would make it any easier to implement?

> Hi Ahmed,
>
[quoted text clipped - 13 lines]
>>
>> thanks in advance...
Dmytro Lapshyn [MVP] - 01 Mar 2006 08:24 GMT
Ahmed,

"Local system" can be an account with quite restricted rights (for example,
AFAIR it cannot access the network). So you may wish to consider running
your service at least under the "NETWORK SERVICE" account or even a more
privileged account.

> Thanks Dmytro.
>
[quoted text clipped - 21 lines]
>>>
>>> thanks in advance...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.