When we open text file using notepad, a shortcut file is created in recent folder. How notepad do it internally. I tried to open text file using
Process.Start("C:\test.txt");
But no shortcut was created. But for other files, like image, video and audio, recent file shortcuts are being created. by using
Process.start("c:\summer.jpeg");
I also tried using the commands below.
ProcessStartInfo psi = new ProcessStartInfo();
psi.WindowStyle = ProcessWindowStyle.Hidden;
psi.UseShellExecute = true;
psi.WorkingDirectory = Environment.GetFolderPath(Environment.SpecialFolder.System);
psi.FileName = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "notepad.exe");
psi.Arguments = "C:\test.txt";
Process.Start(psi);