@Dineshkumar.S , Welcome to Microsoft Q&A, based on my test, It seems that it is hard to get all items in start menu at once.
Based on my search, most of items is placed in the path C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs
.
Please refer to the following steps:
First, Please get the file name with extension name .lnk.
string path = "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs";
List<string> list = new List<string>();
var files=Directory.GetFiles(path,"*.lnk").Select(i=>Path.GetFileNameWithoutExtension(i));
list.AddRange(files);
Second, Please get the folder name.
var dir=Directory.GetDirectories(path).Select(i=>new DirectoryInfo(i).Name);
list.AddRange(dir.ToArray());
Third, We need to add the name about system tool(e.g. Calculator) to the list manually, because there are not in the same location.
list.Add("Calculator ");
.....
Hope my code could help you.
Best Regards,
Jack
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.