On Windows 10, this simple code throws a directory exception not found. I can manually go to the directory manually. What gives?
shortcut_location_root = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
if (String.IsNullOrEmpty(shortcut_location_root))
{
shortcut_location_root =
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\Windows\Start Menu\Programs\Startup";
if (File.Exists(Path.Combine(shortcut_location_root, "someFile" + ".url")))
{
}
source
share