Last active
February 8, 2023 05:41
-
-
Save dstyle0210/dfab028c2b70d128b8032f0dedddbc4c to your computer and use it in GitHub Desktop.
iexplore.exe 실행중인 pid 목록 가져오기
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const exec = require("child_process").exec; | |
| // 임시버전 | |
| const selectPidIExplore = () => { | |
| return new Promise(() => { | |
| exec(`tasklist | findstr "iexplore.exe"`,(err,stdout,stderr) => { | |
| const pids = stdout.split(/\n/).map((row) => { | |
| return row.trim().split(/\s+/)[1]; | |
| }); | |
| pids.pop(); // stdout 스플릿 상, 마지막 빈줄이 들어감. 제외처리 | |
| resolve(pids); | |
| } | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment