I'm trying to run a vb script using process.start() as another user that have admin rights, but i always get the UAC popup with username and password to fill. What i'm i doing wrong?
var scriptProc = new Process
{
StartInfo =
{
FileName = @"cscript,
WorkingDirectory = @"\\AShare\AFolder",
Arguments = "\"" + "Install.vbs" + "\"",
UseShellExecute = false,
WindowStyle = ProcessWindowStyle.Hidden,
Domain = domain,
UserName = username, //Admin username
Password = MakeSecureString(secureString),
}
};
scriptProc.Start();
I want the UAC to popup with yes and no options and not with username and password to fillout options.
tried looking at: How to call a VBScript file in a C# application? but that didn't help.