Im trying to write a program in C# that opens a network share on my local network. The problem i run into is getting past the user login of the network share.
Normally in windows i can just \192.168.101.10 enter in username "nick" password "nick"
so my code is as follows
void FolderPathList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
//throw new NotImplementedException();
ComputerModel selectedCm = (ComputerModel)FolderPathList.SelectedItem;
string uname = "nick";
System.Security.SecureString password= new System.Security.SecureString("nick");
if (CaptureDevices.IsChecked != true) System.Diagnostics.Process.Start("explorer.exe", uname, password, "\\\\192.168.101."+selectedCm.IP+"\\ppt");
if (CaptureDevices.IsChecked != false) System.Diagnostics.Process.Start("explorer.exe", uname, password, "\\\\192.168.101."+selectedCm.IP+"\\c$\\users\\nick\\desktop");
}
It works absolutely fine if i have just
void FolderPathList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
//throw new NotImplementedException();
ComputerModel selectedCm = (ComputerModel)FolderPathList.SelectedItem;
if (CaptureDevices.IsChecked != true) System.Diagnostics.Process.Start("explorer.exe", "\\\\192.168.101."+selectedCm.IP+"\\ppt");
if (CaptureDevices.IsChecked != false) System.Diagnostics.Process.Start("explorer.exe", "\\\\192.168.101."+selectedCm.IP+"\\c$\\users\\nick\\desktop");
}
However i first have to hit each computer in my local network first, enter in the username and password once, and then the computer remembers it. However whenever i shut down and start back up again i have to do it manually each time. Am i doing this wrong?