'Get filenames from the RunKeys and download the files.'

@flow.StateHandler()
def ParseRunKeys(self, responses):

    filenames = []
    client = aff4.FACTORY.Open(self.client_id, mode='r', token=self.token)
    kb = artifact.GetArtifactKnowledgeBase(client)
    for response in responses:
        runkey = response.registry_data.string
        environ_vars = artifact_utils.GetWindowsEnvironmentVariablesMap(kb)
        path_guesses = path_detection_windows.DetectExecutablePaths([runkey], environ_vars)
        if (not path_guesses):
            self.Log("Couldn't    guess    path    for    %s", runkey)
        for path in path_guesses:
            filenames.append(rdf_paths.PathSpec(path=path, pathtype=rdf_paths.PathSpec.PathType.TSK))
    if filenames:
        self.CallFlow(transfer.MultiGetFile.__name__, pathspecs=filenames, next_state='Done')
