internal void CreateShortcuts() { CopyFileFromThisAssembly("StopShare.ico", Environment.GetEnvironmentVariable("temp")); shelllink.ShellLink desktopShortcut = new shelllink.ShellLink(); if (removable) { desktopShortcut.ShortCutFile = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + "\\Delete TA FlashShare.lnk"; } else { desktopShortcut.ShortCutFile = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + "\\Delete TA Share.lnk"; } desktopShortcut.Target = scriptExePath + "\\" + shrtCutName; desktopShortcut.Arguments = "/u"; desktopShortcut.IconPath = Environment.GetEnvironmentVariable("temp") + "\\" + "StopShare.ico"; desktopShortcut.Save(); desktopShortcut.Dispose(); if (removable) { shelllink.ShellLink flashShortcut = new shelllink.ShellLink(); flashShortcut.ShortCutFile = scriptExePath + "\\Delete TA FlashShare.lnk"; flashShortcut.Target = thisProgPath; flashShortcut.Arguments = "/u"; flashShortcut.IconPath = thisProgPath; flashShortcut.Save(); flashShortcut.Dispose(); } }
internal void CreateShortcuts() { CopyFileFromThisAssembly("StopShare.ico", Environment.GetEnvironmentVariable("temp")); shelllink.ShellLink desktopShortcut = new shelllink.ShellLink(); if (removable) desktopShortcut.ShortCutFile = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + "\\Delete TA FlashShare.lnk"; else desktopShortcut.ShortCutFile = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + "\\Delete TA Share.lnk"; desktopShortcut.Target = scriptExePath + "\\" + shrtCutName; desktopShortcut.Arguments = "/u"; desktopShortcut.IconPath = Environment.GetEnvironmentVariable("temp") + "\\" + "StopShare.ico"; desktopShortcut.Save(); desktopShortcut.Dispose(); if (removable) { shelllink.ShellLink flashShortcut = new shelllink.ShellLink(); flashShortcut.ShortCutFile = scriptExePath + "\\Delete TA FlashShare.lnk"; flashShortcut.Target = thisProgPath; flashShortcut.Arguments = "/u"; flashShortcut.IconPath = thisProgPath; flashShortcut.Save(); flashShortcut.Dispose(); } }