Post

Launch a program using different logon credentials using VB and CreateProcessWithLogon

A friend of mine (who doesn’t have a blog) that works in a SysAdmin role needed to see an example of using CreateProcessWithLogin using VB. He chanced upon an example showing how to do this using C#. Since he’s not versed in multiple languages, it was a bit hard to digest. He sent me the link to the source and I’ve converted it to VB. I figured I’d share it with anyone else who is interested.

Download

UPDATE: He also sent along a link to an example on the P/Invoke site, but said it didn’t work. I also should point out that I haven’t tested this code myself, I’ll leave that up to him. If it doesn’t work, I’ll look into it further.

This post is licensed under CC BY 4.0 by the author.