Welcome to AddressOf.com Sign in | Join | Help

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 [1] with anyone else who is interested.

[1] - 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.

Published Thursday, January 27, 2005 4:59 PM by CorySmith
Filed under: , ,

Comments

# re: Launch a program using different logon credentials using VB and CreateProcessWithLogon

Thursday, February 02, 2006 12:20 AM by KenLin
Dear Sir,

I download and open your translated Project. However, I found out that you are calling Win32API to do so, May I know if there is any easier way to do so?

Anyway, I am also MVP in VB.NET, I visited Global Summit 2 times, I might have met you before.

Regards,
Ken Lin
kenlin2000@hotmail.com.no-spam

P.S., Please send me email by deleting ".no-Spam" from the email address I have given.

# re: Launch a program using different logon credentials using VB and CreateProcessWithLogon

Tuesday, March 21, 2006 5:14 AM by mars
you can help me with c#.net .
Anonymous comments are disabled