UAC Prompt using VB.net code
Posted on 2012-08-23
I am writing a program in vb.net that requires running an external program (psexec.exe).
But I need to have my program prompt for Admin credentials and then pass them through to open the psexec.exe command as the admin from UAC.
I am unable to pass the credentials using the plain Process.Start syntax due to security reasons (we don't want to pass the password that way.)
Instead of using something like the following code -
Process.Start("cmd.exe", " /k PSExec.exe \\" & computername.text & " cmd.exe"
which will call the cmd to run psexec (but needs to have it loaded as Admin).
Sorry for the confusion on the information - but short story I need a way to prompt (through my VB program) for User Account Control prompt to get an admin to input Admin credentials and then open and execute a command & psexec.
Please let me know if anyone has any advice. Thank you.