Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 25-11-2008
Member
 
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
Reply With Quote
  #2  
Old 26-11-2008
Member
 
Join Date: Dec 2007
Posts: 2,273
Re: How to use CreateProcessAsUserW() for the user other then Administrator

See similar threads: Issue - This security ID may not be assigned as the owner object
Reply With Quote
  #3  
Old 26-11-2008
Member
 
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.
Reply With Quote
  #4  
Old 26-11-2008
Member
 
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.
Reply With Quote
  #5  
Old 26-11-2008
Member
 
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()
Reply With Quote
  #6  
Old 26-11-2008
Member
 
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
Reply With Quote
  #7  
Old 02-12-2008
Member
 
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to use CreateProcessAsUserW() for the user other then Administrator"
Thread Thread Starter Forum Replies Last Post
Re-occuring Administrator User Account Lockout LolaA Window 2000 Help 8 19-04-2012 05:16 PM
Changing administrator user name in Windows 7 choadie26 Operating Systems 1 22-01-2011 01:45 PM
Problem with Domain user as local administrator Jasonholt Active Directory 3 25-05-2010 09:50 AM
Windows XP Administrator user hijacked gadiga Operating Systems 2 10-07-2008 11:24 AM
administrator runas for a domain user yba02 Windows Server Help 2 24-03-2007 12:11 PM


All times are GMT +5.5. The time now is 01:04 AM.