private static Map getIndexModelNameDeviceMapping(Map validDeviceIndexMapping)
        {
            Map indexToModelNameMap = new HashMap();

            //wmic /namespace:\\root\cimv2 path Win32_DiskDrive get index, model
            String[] cmd = new String[7];
            cmd[0] = "wmic";
            cmd[1] = "/namespace" + ":\\\\root\\cimv2";   
            cmd[2] = "path";
            cmd[3] = "Win32_DiskDrive";
            cmd[4] = "get";
            cmd[5] = "index";
            cmd[6] = ",model";      

            String outputBuffer = callExternalProcess(cmd);

            if(outputBuffer == null)
                return null;

            String[] outputLines = outputBuffer.split(System.getProperty("line.separator"));

            int deviceIndex;
            String modelName;

            String line;
            for(int i = 0; i < outputLines.length; i++)   //for every output line
            {
                line = outputLines[i].trim();
                if(!line.startsWith("Index") && !line.equals(""))   //if line is not a column header line
                {   
                    deviceIndex = Integer.parseInt(line.substring(0,1));   //extract index of this device
                    modelName = line.substring(1,line.length()).trim();      //extract model name for this index

                    if(modelName.length() <= 0)   //if no model name is reported by WMI, make a generic one (eg with PDE)
                        modelName = "Hard Disk " + deviceIndex;

                    //only add to map if current device index is a valid one
                    Set validDeviceIndices = validDeviceIndexMapping.keySet();
                    Iterator indexIterator = validDeviceIndices.iterator();
                    while(indexIterator.hasNext())
                    {
                        int currValidIndex = ((Integer)indexIterator.next()).intValue();
                        if(deviceIndex == currValidIndex)   //device index is valid
                            indexToModelNameMap.put(new Integer(deviceIndex), modelName);
                    }

                }
            }

            return indexToModelNameMap;
        }