Ejemplo n.º 1
0
 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();
     }
 }
Ejemplo n.º 2
0
 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();
     }
 }