At the end of my c# program I launch it, and I get following error. This only happens on Windows 7, code works just as expected on windows xp! thanks
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
using System;
using System.Text;
using System.IO;
using System.Diagnostics;
using System.Threading;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
StreamWriter file = new System.IO.StreamWriter("c:\\file123.bat");
file.WriteLine("ipconfig /all");
file.WriteLine("pause");
file.Close();
Process.Start("c:\\file123.bat");
Thread.Sleep(500);
File.Delete("c:\\file123.bat");
}
}
}