/* 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'); } });
target: process.execPath, electron.shell.writeShortcutLink( join(homedir(), "Desktop", "Lightcord.lnk"), "create", options ); electron.shell.writeShortcutLink( join( electron.app.getPath("appData"),