C# Launch command as administrator
<p>I am trying to launch csript as an administrator (the account logged in has admin rights). setting the startinfo.verb to runas does not work.</p>

<pre><code>ProcessStartInfo p1 = new ProcessStartInfo();
p1.UseShellExecute = true;
p1.Verb = "runas";
p1.FileName = "cscript";
p1.Arguments = "I:\\WPKG\\wpkg.js /synchronize /quiet /nonotify";
Process p = new Process();
p.StartInfo = p1;
p.Start();
</code></pre>

<p>The only way I can get it to start with privileges is to manually set the username and password. However I cannot hardcode that information or put it into configurations. Is there any way to have the cmd elevate without the login info?</p>

<p>I have also tried adding using (System.Security.Principal.WindowsIdentity.GetCurrent().Impersonate()) around the above code with no luck either.</p>

<p>Note: If I run the bat file directly, it works, if i run with password hardcoded, it works. It only fails to elevate launching from C# without login information.</p>
