打开进程目录,复制进程路劲

This commit is contained in:
unknown 2020-04-21 09:02:23 +08:00
parent 948eb509cb
commit f950617785

View File

@ -4,12 +4,16 @@ const { exec, execFile, execSync } = require("child_process")
const path = require("path")
const fs = require('fs');
const process = require('process');
const { clipboard, shell } = require('electron')
// const jschardet = require('jschardet');
isDev = /unsafe-\w+\.asar/.test(__dirname) ? false : true
basename = path.basename
copy = clipboard.writeText
open = shell.showItemInFolder
GetBinPath = ExeFile => {
if (isDev) {
return path.join(__dirname, 'bin', ExeFile)
@ -63,7 +67,7 @@ taskkill = (pid, restart) =>
}
if(restart){
utools.showNotification('重启进程成功!')
exec(restart);
exec(`"${restart}"`);
}
reslove(true);
})