Question Control Panel as Admin

shawnplr

Active member
Joined
May 17, 2007
Messages
44
Programming Experience
Beginner
When I use the following code with control or explorer nothing happens but it works with notepad and the like.
VB.NET:
        Private pw As New System.Security.SecureString 
        Dim cp As New Process 
        With cp.StartInfo 
            .FileName = "control" 
            .UseShellExecute = False 
            .UserName = "User" 
            For Each ch As Char In "Password" 
                pw.AppendChar(ch) 
            Next 
            .Password = pw 
        End With 
        cp.Start()
The code will launch Control Panel if I remove the following.
VB.NET:
            .UserName = "User" 
            For Each ch As Char In "Password" 
                pw.AppendChar(ch) 
            Next 
            .Password = pw
I am at a loss here.
 
Back
Top