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 / December 2007

Tip: Looking for answers? Try searching our database.

allow service to interact with desktop - vista and managed code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
almir - 03 Dec 2007 13:20 GMT
Hi,

under Vista it is not possible to interact with users-desktop msdn
suggests  using  CreateProcessAsUser and I found a partial
implementation of this method in managed code here
http://odetocode.com/Blogs/scott/archive/2004/10/28/602.aspx however
i do not know how to obtain token of a user which is currently loged
in which means that I have a problem in this line
IntPtr hToken = WindowsIdentity.GetCurrent().Token; //here i get a
service token and I need user token so that i can start application in
its context, what is the right way to do it ?

do you know any other implementation which enables me to start
application so that it is visible by user?

thanks
almir
Michael Nemtsev [MVP] - 03 Dec 2007 21:03 GMT
Hello almir,

Why do u need to allow service interact with desktop?
And what does "application so that it is visible by user" mean?

As I understand u need to provide the general service without UI, but use
any IPC (interprocess communication) to talk to you separate UI application

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour 

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

a> Hi,
a>
a> under Vista it is not possible to interact with users-desktop msdn
a> suggests  using  CreateProcessAsUser and I found a partial
a> implementation of this method in managed code here
a> http://odetocode.com/Blogs/scott/archive/2004/10/28/602.aspx however
a> i do not know how to obtain token of a user which is currently loged
a> in which means that I have a problem in this line
a> IntPtr hToken = WindowsIdentity.GetCurrent().Token; //here i get a
a> service token and I need user token so that i can start application
a> in
a> its context, what is the right way to do it ?
a> do you know any other implementation which enables me to start
a> application so that it is visible by user?
a>
a> thanks
a> almir
almir - 04 Dec 2007 15:04 GMT
yes,
the problem is however starting application in user context, so that
he can see it

> Hello almir,
>
[quoted text clipped - 28 lines]
> a> thanks
> a> almir

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.