private List<String> getPID(String programName) throws IOException {
        logger.detailedTrace("Obtaining PIDs for " + programName);
        Process process = new ProcessBuilder("wmic", "Path", "win32_process", "Where",
                commandLike(programName), "Get", "Caption,", "ProcessId").start();

        BufferedReader outputReader = new BufferedReader(new InputStreamReader(
                process.getInputStream()));

        List<String> pids = new ArrayList<String>();

        Pattern pattern = compile("^\\S+\\s+(\\d+).+" + quote(programName));

        String outputMessage;
        while ((outputMessage = outputReader.readLine()) != null)
            if (!outputMessage.isEmpty() && !outputMessage.startsWith("Caption")
                    && !outputMessage.startsWith("WMIC.exe")) {
                Matcher matcher = pattern.matcher(outputMessage);
                if (matcher.find())
                    pids.add(matcher.group(1));
            }

        return pids;
    }