Results 1 to 7 of 7

Thread: How to use CreateProcessAsUserW() for the user other then Administrator

  1. #1
    Join Date
    Nov 2008
    Posts
    4

    How to use CreateProcessAsUserW() for the user other then Administrator

    Hi all

    I am using CreateProcessAsUserW() in my code to create a process. The code is working fine if the user is the Administrator or a member of Administrator group. But when I try to create the process as a user which is not a member of Administrator it is giving the error 1307 which means (This security ID may not be assigned as the owner of this object).

    So should I have to set some priviledges for the user.
    And if yes then which one and what will be the procedure to do so.

    Thanks a lot in advance

  2. #2
    Join Date
    Dec 2007
    Posts
    2,291

    Re: How to use CreateProcessAsUserW() for the user other then Administrator


  3. #3
    Join Date
    Nov 2008
    Posts
    4

    Re: How to use CreateProcessAsUserW() for the user other then Administrator

    @EINSTEIN

    The thread you have mentioned talks about the same error code. But my problem is different. He is just copying a batch file and I am writing a function in visual c++ to create a proces as particular user.

  4. #4
    Join Date
    May 2008
    Posts
    540

    Re: How to use CreateProcessAsUserW() for the user other then Administrator

    If you use the CreateProcessAsUser function, you can specify the CREATE_BREAKAWAY_FROM_JOB bit in the creation flags.

  5. #5
    Join Date
    Nov 2008
    Posts
    4

    Re: How to use CreateProcessAsUserW() for the user other then Administrator

    @Rkhon

    I have tried this but still the same problem....

    I like to mention the sequence of functions I am using for better understanding of the problem.

    LogonUserW()
    LoadUserProfileW()
    CreateEnvironment Block()
    CreateProcessAsUserW()

  6. #6
    Join Date
    Apr 2008
    Posts
    1,948

    Re: How to use CreateProcessAsUserW() for the user other then Administrator

    Quote Originally Posted by rajeevsandil View Post
    So should I have to set some priviledges for the user.
    And if yes then which one and what will be the procedure to do so.
    For this purpose, I think this sample will better help you to add a privilege to an account.

    http://www.mvps.org/win32/lsa/lsa_laar.cpp

  7. #7
    Join Date
    Nov 2008
    Posts
    4

    Re: How to use CreateProcessAsUserW() for the user other then Administrator

    Hi all

    can you plz help me out.

Similar Threads

  1. Re-occuring Administrator User Account Lockout
    By LolaA in forum Window 2000 Help
    Replies: 8
    Last Post: 19-04-2012, 05:16 PM
  2. Changing administrator user name in Windows 7
    By choadie26 in forum Operating Systems
    Replies: 1
    Last Post: 22-01-2011, 01:45 PM
  3. Problem with Domain user as local administrator
    By Jasonholt in forum Active Directory
    Replies: 3
    Last Post: 25-05-2010, 09:50 AM
  4. Windows XP Administrator user hijacked
    By gadiga in forum Operating Systems
    Replies: 2
    Last Post: 10-07-2008, 11:24 AM
  5. administrator runas for a domain user
    By yba02 in forum Windows Server Help
    Replies: 2
    Last Post: 24-03-2007, 12:11 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,049,350.23292 seconds with 16 queries