From 3984775d0c6ffe34f4ea6edc9959e089f43050d5 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 28 Jan 2018 23:38:10 -0600 Subject: [PATCH] Use environment info for finding start menu programs path Fixes issue #202. --- DS4Windows/DS4Forms/WinProgs.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Forms/WinProgs.cs b/DS4Windows/DS4Forms/WinProgs.cs index 9d02fbd..c4bccac 100644 --- a/DS4Windows/DS4Forms/WinProgs.cs +++ b/DS4Windows/DS4Forms/WinProgs.cs @@ -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]);