Use CreateProcessWithLogonW to run the runas command.

You'll programmatically enter the user/password as parameters to CreateProcessWithLogonW and it will execute runas under that account without...