Just a simplification:
bool useKchmviewer = system("which kchmviewer > /dev/null") == 0;

Reply via email to