Is it possible to set: "show block on specific pages" into "is only the listed pages", programmatically?
You need to set,  visibility => 'BLOCK_VISIBILITY_LISTED'

function menuNode_block_info() {
  $blocks['Course'] = array(
    'info' =&gt; t('Dit toont alle blocken weer'),
    'region' =&gt; 'sidebar_first',
    'weight' =&gt; 1,
    'status' =&gt; 1,
    'visibility' =&gt; 'BLOCK_VISIBILITY_LISTED',
    'pages' =&gt; "overview_courses/course",
    'cache' =&gt; 'DRUPAL_NO_CACHE',
  );
  return $blocks;
}