Use environment info for finding start menu programs path

Fixes issue #202.
This commit is contained in:
Travis Nickles 2018-01-28 23:38:10 -06:00
parent a1e99344d2
commit 3984775d0c

View File

@ -165,7 +165,7 @@ namespace DS4Windows
{
lodsf.Clear();
lodsf.AddRange(Directory.GetFiles(path, "*.lnk", SearchOption.AllDirectories));
lodsf.AddRange(Directory.GetFiles(@"C:\ProgramData\Microsoft\Windows\Start Menu\Programs", "*.lnk", SearchOption.AllDirectories));
lodsf.AddRange(Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.CommonStartMenu) + "\\Programs", "*.lnk", SearchOption.AllDirectories));
for (int i = 0; i < lodsf.Count; i++)
lodsf[i] = GetTargetPath(lodsf[i]);