Starting explorer
-
This is kinda weird. When I run this:
System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo();
psi.FileName = "explorer.exe";
psi.Arguments = @"C:\Data\Workshop";
System.Diagnostics.Process.Start(psi);I get an error saying the path does not exist or is not a directory. However, if I just run:
System.Diagnostics.Process.Start(@"C:\Data\Workshop");
it runs fine. Why is that?
-
This is kinda weird. When I run this:
System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo();
psi.FileName = "explorer.exe";
psi.Arguments = @"C:\Data\Workshop";
System.Diagnostics.Process.Start(psi);I get an error saying the path does not exist or is not a directory. However, if I just run:
System.Diagnostics.Process.Start(@"C:\Data\Workshop");
it runs fine. Why is that?
-
This is kinda weird. When I run this:
System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo();
psi.FileName = "explorer.exe";
psi.Arguments = @"C:\Data\Workshop";
System.Diagnostics.Process.Start(psi);I get an error saying the path does not exist or is not a directory. However, if I just run:
System.Diagnostics.Process.Start(@"C:\Data\Workshop");
it runs fine. Why is that?
-
It could be that your not passing in the correct arguments for Explorer. http://support.microsoft.com/kb/314853[^] I haven't tried this out in C#, but I ran it from the command line with: explorer /root,c:\ and it displayed correctly.
That would be why :) Knew it had to be something stupid. Thanks mate.