Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. CreateProcessWithTokenW

CreateProcessWithTokenW

Scheduled Pinned Locked Moved C#
csharpcomtutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Harkamal Singh
    wrote on last edited by
    #1

    Can someone publish C# code to make use of CreateProcessWithTokenW function, so that i can run process just by getting token from current user, instead of passing user/pw for every run (WindowsIdentity.GetCurrent().Token) Basically trying to extend impersonation functionality to disconnected functions like Process.Start() Impersonation example: http://www.codeproject.com/csharp/zetaimpersonator.asp Many thanks.

    P 1 Reply Last reply
    0
    • H Harkamal Singh

      Can someone publish C# code to make use of CreateProcessWithTokenW function, so that i can run process just by getting token from current user, instead of passing user/pw for every run (WindowsIdentity.GetCurrent().Token) Basically trying to extend impersonation functionality to disconnected functions like Process.Start() Impersonation example: http://www.codeproject.com/csharp/zetaimpersonator.asp Many thanks.

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      You may want to use CreateProcessAsUser instead. This[^] link shows how to do it.

      Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.

      H 1 Reply Last reply
      0
      • P Pete OHanlon

        You may want to use CreateProcessAsUser instead. This[^] link shows how to do it.

        Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.

        H Offline
        H Offline
        Harkamal Singh
        wrote on last edited by
        #3

        Thanks Pete, I need to use CreateProcessWithTokenW as to allow seemless impersonation; without having to manage credentials. I found an interesting site, but that also does not have a sample code for me...http://www.pinvoke.net/[^]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups