Sign in to follow this  
Followers 0
BLuFeNiX

RunAs in C++

2 posts in this topic

Hey guys, I've Googled around a bit and can't find anything useful. I need to run a program as a certain user. The username, password, and path to the executable should be built in to the code. Can anyone give me the most simplified code possible to achieve this?

Thanks.

Share this post


Link to post
Share on other sites



CreateProcessWithLogonW() is the name of the function you're looking for - I think.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0