CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    Join Date
    Sep 2004
    Posts
    1,361

    Re: Finding the user that owns a process.

    I looked at your program, I kind of wished it was more of a proper project, but that is a small gripe. I am guessing that the reason my testing (of my code) is failing is because Elevated Admin is not sufficient and you are creating a service, which is running as system which is permitted to do what you did.

    I guess I would have to know what level my installer was running at, so I could attempt to do it the way you did if I was running as system, which would ONLY be from an MSI. I can do this with my own processes to simulate it, but to verify it working I would need a way to tell if a process was running elevated or not. Is there an easy way to determine that?

    It seems that an elevated user is a "ghosted" version of your user with higher privileges. In task manager it all seems to be the same. I have noticed this because of some annoying network drive mapping problems. I can create mapped network drives to automatically reconnect at login. They work fine for non-elevated apps. However any elevated app sees the same drive as disconnected and they need to re-enter user name / password each time I reboot.

    If any elevated program does this, then all elevated programs see the drive mapped. Vista will "Sticky" the non elevated mappings, but refuses to do that with the elevated equivalents. So I am guessing Elevated "me" is really a different user all-together even though my user name and user context is the same.

  2. #17
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Finding the user that owns a process.

    I looked at your program, I kind of wished it was more of a proper project, but that is a small gripe.
    Yep, it is. Actually, it was answering the question in the thread's title.

    As I said before, there're lots of specific questions you're asking in one thread, so it's hard to me to follow all of them (besides, I can't get a good part of them because of knowing nothing about some specifics). In case you want get the answers from the community, ask the questions separately and clearly.

    Or just fing a time to learn MSI and get rid of your surrogate installer, along with the problems it brings in.
    Best regards,
    Igor

  3. #18
    Join Date
    Sep 2004
    Posts
    1,361

    Re: Finding the user that owns a process.

    Yeah I know, the thread got off track and that is an IT support question really. I found a tool, process explorer that will give me that info and I can tell my installer, on vista is able to launch an app without elevated privileges while itself is running that way. However that was using my own processes in my own session. As for your code, I am going to hold off on it for a while with respect to the MSI installer since I can only test is as "SYSTEM" and I can't run Dev Studio as "SYSTEM" so I can't really step through and debug it. Anyhow, its about time this thread died.

    Thanks for all the info.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured