Re: Running sysinternals PSPASSWD.exe from local system account
- From: Lucvdv <replace_name@xxxxxxxx>
- Date: Fri, 20 Oct 2006 16:35:26 +0200
On Fri, 20 Oct 2006 11:05:55 +0200, Lucvdv <replace_name@xxxxxxxx> wrote:
Does anyone have an idea what the program could be missing that makes it
skip over eveything except the local computer?
I got a bit further, 3 different situations (all running under the local
system account):
-1-
Call LogonUser and impersonate, then use Diagnostics.Process.Start: the new
process can't access the network.
Its stdout and stderr can be captured:
newProc.WaitForExit()
Dim s1 As String = newProc.StandardOutput.ReadToEnd
-2-
Don't call LogonUser and do no impersonation, but specify username and
password in the StartupInfo you're passing to Diagnostics.Process.Start:
the new process can access the network, but you don't get anything back
from its stdout and stderr. .StandardOutput.ReadToEnd returns an empty
string.
-3-
Combine the two: call LogonUser and impersonate, *and* specify the same
username and password in StartupInfo. The process runs and can access the
network as in -2-, but calling .WaitForExit throws an "invalid handle"
exception, so still no stdout / stderr.
I'd like to know when/where the process fails, and a simple exit code isn't
enough because it handles several machines with a result message for each.
.
- References:
- Prev by Date: Computer Certificates
- Next by Date: Re: Recover files after using Robocopy /mir command
- Previous by thread: Running sysinternals PSPASSWD.exe from local system account
- Next by thread: Computer Certificates
- Index(es):
Relevant Pages
|