congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo For Javascript
Shell.writeShortcutLink
Code IndexAdd Tabnine to your IDE (free)

How to use
writeShortcutLink
function
in
Shell

Best JavaScript code snippets using electron.Shell.writeShortcutLink(Showing top 2 results out of 315)

origin: techtacoriginal/offlinebay

/* Windows Shortcut */
$('#mnuShortcut').on('click', function () {
  if (process.platform === 'win32') {
    if (confirm('You need a shortcut to OfflineBay on your start menu for Notifications to work.\nHit OK to create the shortcut now.', 'Windows shortcut helper')) {
      let shortcut = path.join(process.env.APPDATA, 'Microsoft', 'Windows', 'Start Menu', 'Programs', 'OfflineBay.lnk');
      let res = shell.writeShortcutLink(shortcut, {
        target: process.execPath,
        appUserModelId: process.execPath,
        icon: path.join(__dirname, 'img', 'icon.ico'),
        iconIndex: 0
      });
      if (res) {
        popMsg('Shortcut created successfully', 'success');
      } else {
        popMsg('Failed to create the shortcut', 'danger');
      }
    }
  } else {
    popMsg('You need to be on Windows to create a shortcut', 'warning');
  }
});
origin: Lightcord/Lightcord

  target: process.execPath,
electron.shell.writeShortcutLink(
  join(homedir(), "Desktop", "Lightcord.lnk"),
  "create",
  options
);
electron.shell.writeShortcutLink(
  join(
    electron.app.getPath("appData"),
electron(npm)ShellwriteShortcutLink

Most used electron functions

  • App.on
  • App.quit
  • IpcMain.on
  • Process.platform
  • Menu.buildFromTemplate
  • IpcRenderer.on,
  • WebContents.openDevTools,
  • Shell.openExternal,
  • BrowserWindow.webContents,
  • IpcRenderer.send,
  • Menu.setApplicationMenu,
  • BrowserWindow.loadURL,
  • Process.env,
  • Event.preventDefault,
  • Dialog.showOpenDialog,
  • BrowserWindow.on,
  • BrowserWindow.close,
  • Dialog.showMessageBox,
  • require

Popular in JavaScript

  • glob
    a little globber
  • async
    Higher-order functions and common patterns for asynchronous code
  • crypto
  • yargs
    yargs the modern, pirate-themed, successor to optimist.
  • chalk
    Terminal string styling done right
  • rimraf
    A deep deletion module for node (like `rm -rf`)
  • postcss
  • fs-extra
    fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.
  • semver
    The semantic version parser used by npm.
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now