[Solved] How do i use net user inside a C# console program? [closed]


Probably because you’re missing a space to separate the arguments:

    enable_admin.StartInfo.Arguments = "user " + "administrator " + "/active:yes";
                                                               ^----
    enable_admin.StartInfo.FileName = @"C:\Windows\System32\net";
    disable_admin.StartInfo.Arguments = "user " + "administrator " + "/active:no";
                                                                ^----
    disable_admin.StartInfo.FileName = @"C:\Windows\System32\net";

0

solved How do i use net user inside a C# console program? [closed]