mirror of
https://github.com/fofolee/uTools-ProcessKiller.git
synced 2025-06-10 07:28:03 +08:00
打开进程目录,复制进程路劲
This commit is contained in:
parent
948eb509cb
commit
f950617785
@ -4,12 +4,16 @@ const { exec, execFile, execSync } = require("child_process")
|
|||||||
const path = require("path")
|
const path = require("path")
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const process = require('process');
|
const process = require('process');
|
||||||
|
const { clipboard, shell } = require('electron')
|
||||||
// const jschardet = require('jschardet');
|
// const jschardet = require('jschardet');
|
||||||
|
|
||||||
isDev = /unsafe-\w+\.asar/.test(__dirname) ? false : true
|
isDev = /unsafe-\w+\.asar/.test(__dirname) ? false : true
|
||||||
|
|
||||||
basename = path.basename
|
basename = path.basename
|
||||||
|
|
||||||
|
copy = clipboard.writeText
|
||||||
|
open = shell.showItemInFolder
|
||||||
|
|
||||||
GetBinPath = ExeFile => {
|
GetBinPath = ExeFile => {
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
return path.join(__dirname, 'bin', ExeFile)
|
return path.join(__dirname, 'bin', ExeFile)
|
||||||
@ -63,7 +67,7 @@ taskkill = (pid, restart) =>
|
|||||||
}
|
}
|
||||||
if(restart){
|
if(restart){
|
||||||
utools.showNotification('重启进程成功!')
|
utools.showNotification('重启进程成功!')
|
||||||
exec(restart);
|
exec(`"${restart}"`);
|
||||||
}
|
}
|
||||||
reslove(true);
|
reslove(true);
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user