So, basically what I'm doing is trying to open up \\whatever\c$ on a remote workstation. I'll start by saying that the application is executed using <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> now when someone executes the application they actually use a different domain and username/password than what is used to sign onto the workstation. from within the application I can do whatever I want. but right now what I'm trying to accomplish is have a button link to \whatever\c$ and just open that up in explorer so I can look at some files, however I don't want to type in a password each time. especially considering it's the same credentials I used to open the app. any help would be appreciated. here's the current code I'm using.
string startlocation = @"\\" + textBox1.Text + @"\C$";
System.Diagnostics.ProcessStartInfo pcsi = new System.Diagnostics.ProcessStartInfo();
pcsi.FileName = "explorer.exe";
pcsi.Arguments = startlocation;
System.Diagnostics.Process.Start(pcsi);
from what I can tell this should automatically pass the credentials used when the application was opened. but it still opens up the UAC asking for credentials. I'm stuck.
p.s. when I was looking for a similar situation on SO I noticed a lot of other people were asking how to open it with other credentials or impersonate that's not what I want to do. I want to use the credentials used for opening the app.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire