protected override DetectedLocations getPaths(LocationShortcut get_me)
        {
            FileInfo the_shortcut;
            //StringBuilder start_menu;
            DetectedLocations return_me = new DetectedLocations();
            String            path;

            List <string> paths = this.getPaths(get_me.ev);

            the_shortcut = null;

            foreach (string check_me in paths)
            {
                the_shortcut = new FileInfo(Path.Combine(check_me, get_me.path));
                if (the_shortcut.Exists)
                {
                    break;
                }
            }



            if (the_shortcut != null && the_shortcut.Exists)
            {
                IWshRuntimeLibrary.WshShell     shell = new IWshRuntimeLibrary.WshShell();
                IWshRuntimeLibrary.IWshShortcut link  = (IWshRuntimeLibrary.IWshShortcut)shell.CreateShortcut(the_shortcut.FullName);

                try {
                    path = Path.GetDirectoryName(link.TargetPath);
                    path = get_me.modifyPath(path);
                    return_me.AddRange(Core.locations.interpretPath(path));
                } catch { }
            }
            return(return_me);
        }
Example #2
0
 protected virtual DetectedLocations getPaths(LocationShortcut get_me)
 {
     return(new DetectedLocations());
 }