Пример #1
0
        private static void DeleteProgramShortcuts()
        {
            if (File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "ITpipes.lnk")))
            {
                File.Delete(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "ITpipes.lnk"));
            }

            if (File.Exists(Path.Combine(UtilFunctions.GetAllUsersDesktopFolder(), "ITpipes.lnk")))
            {
                File.Delete(Path.Combine(UtilFunctions.GetAllUsersDesktopFolder(), "ITpipes.lnk"));
            }

            if (File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "InspectIT.lnk")))
            {
                File.Delete(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "InspectIT.lnk"));
            }

            if (File.Exists(Path.Combine(UtilFunctions.GetAllUsersDesktopFolder(), "InspectIT.lnk")))
            {
                File.Delete(Path.Combine(UtilFunctions.GetAllUsersDesktopFolder(), "InspectIT.lnk"));
            }

            if (Directory.Exists(Path.Combine(UtilFunctions.GetAllUsersStartMenuFolder(), "ITpipes")))
            {
                Directory.Delete(Path.Combine(UtilFunctions.GetAllUsersStartMenuFolder(), "ITpipes"), true);
            }
        }