start process as impersonated account for NETSH DHCP?

From: Monroe (monroe.golden_at_bellsouth.com)
Date: 11/23/04


Date: 23 Nov 2004 12:27:40 -0800

Am trying to automatically query and update DHCP servers via a web
application with VB.NET. Testing with a privileged account, defined
thus in web.config:

<identity impersonate="true" userName="<domain>\<user>"
password="<password>" />

Have also modified machine.config thusly, and restarted IIS (but
haven't rebooted):

<processModel enable="true" ... userName="<domain>\<user>"
password="<password>" />

I can run NETSH commands interactively when logged in. Also, in code
below, I confirm that I am impersonating the user rather than running
as ASPNET. It still seems that the process is running with limited
rights of ASPNET; output reads: "Unable to determine the DHCP Server
version for the Server <ip>.Server may not function properly."

Dim proc As New System.Diagnostics.Process()
proc.StartInfo.FileName = "netsh"
proc.StartInfo.Arguments = "dhcp server <ip> show scope"
proc.StartInfo.WindowStyle =
System.Diagnostics.ProcessWindowStyle.Hidden
proc.StartInfo.UseShellExecute = False
proc.StartInfo.RedirectStandardOutput = True
proc.Start()
TextBox1.Text = proc.StandardOutput.ReadToEnd.ToString & " " &
System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString
proc.Close()
proc.Dispose()

How can I ensure/confirm that the System.Diagnostic.Process is running
as the impersonated account, and not the parent? Assistance greatly
appreciated!