How to prevent certain MS Outlook dialog boxes from showing?

by Jeremy Saunders on December 6, 2009

This script will manage the “PONT_STRING” registry value to control the “Don’t Show Dialog” Setting for some of the Outlook dialog boxes that don’t have a simple way of preventing them from showing via a Group Policy Setting, etc. Under Outlook 2007 there are two particular dialog boxes that may prompt the user when a new profile is created.

This script will prevent them from showing.

These options are held under the following key…

HKEY_CURRENT_USER\Software\Microsoft\Office\xx.0\Outlook\Options\General

…where xx is the Office version number.

Enjoy!

MSOutlookDialogs.vbs


' This script will manage the "PONT_STRING" registry value to control the "Don't Show
' Dialog" Setting" for some of the Outlook dialog boxes that don't have a simple way
' of preventing them from showing via a Group Policy Setting, etc.
'
' These options are held under the following key...
' HKEY_CURRENT_USER\Software\Microsoft\Office\xx.0\Outlook\Options\General
' where xx is the Office version number.
'
' Note that the "PONT_STRING" string must end with a comma.
'
' Simply set all Office versions you are using in the arrVersions array and the
' dialogs you want to prevent from displaying in the arrDialogs array.
'
' Release 1.0
' Written by Jeremy@jhouseconsulting.com on 6th December 2009.
'
Option Explicit

Dim arrVersions, arrDialogs, objShell, Version, strKeyRoot, strKeyPath
Dim Dialog, strValueData, arrValueData, BlnReturn
'
arrVersions = Array("12.0")
' Note that...
' - Office 2000 = 9.0
' - Office XP/2002 = 10.0
' - Office 2003 = 11.0
' - Office 2007 = 12.0
'
arrDialogs = Array("60","48")
' 60 - "Windows Desktop Search is not currently installed or not up to date. Outlook
'       will not be able to provide fast search results when using the new Instant
'       Search functionality unless this Windows component is installed. Please contact
'       your system administrator."
' 48 - "Outlook, Windows Internet Explorer, and other applications save lists of RSS
'       Feeds that you subscribe to. The Common Feed List in Microsoft Windows
'       maintains one synchronized list of RSS Feeds. Do you want your RSS Feeds in
'       Outlook to be synchronized with the Common Feed List?"
'
Set objShell = WScript.CreateObject("WScript.Shell")

strKeyRoot = "HKCU\"
strKeyPath = "Software\Microsoft\Office\"

If IsArray(arrVersions) AND IsArray(arrDialogs) Then
  For Each Version in arrVersions
    strKeyPath = strKeyPath & Version & "\Outlook\Options\General\"
    If RegValueExists(strKeyRoot & strKeyPath & "PONT_STRING") Then
      strValueData = objShell.RegRead(strKeyRoot & strKeyPath & "PONT_STRING")
      arrValueData = Split(strValueData,",")
      For Each Dialog in arrDialogs
        BlnReturn = InArray(Dialog,arrValueData)
        If NOT BlnReturn Then
          strValueData = strValueData & Dialog & ","
        End If
      Next
    Else
      For Each Dialog in arrDialogs
        strValueData = strValueData & Dialog & ","
      Next
    End If
    objShell.RegWrite strKeyRoot & strKeyPath & "PONT_STRING", strValueData
  Next
End If

Set objShell = Nothing

wscript.quit(0)

Function RegValueExists(sRegValue)
' Returns True or False based of the existence of a registry value.
  Dim oShell, RegReadReturn
  Set oShell = CreateObject("WScript.Shell")
  RegValueExists = True  ' init value
  On Error Resume Next
  RegReadReturn = oShell.RegRead(sRegValue)
  If Err.Number <> 0 Then
    RegValueExists = False
  End if
  On Error Goto 0
  Set oShell = Nothing
End Function

Function InArray(item,myarray)
  Dim i
  For i=0 To UBound(myarray) Step 1
    If lcase(item)=lcase(myarray(i)) Then
      InArray=True
      Exit Function
    End If
  Next
  InArray=False
End Function
Jeremy Saunders

Jeremy Saunders

Independent Consultant | Contractor | Microsoft & Citrix Specialist | Desktop Virtualization Specialist at J House Consulting
Jeremy is a highly respected, IT Professional, with over 30 years’ experience in the industry. He is an independent IT consultant providing expertise to enterprise, corporate, higher education and government clients. His skill set, high ethical standards, integrity, morals and attention to detail, coupled with his friendly nature and exceptional design and problem solving skills, makes him one of the most highly respected and sought after Microsoft and Citrix technical resources in Australia. His alignment with industry and vendor best practices puts him amongst the leaders of his field.
Jeremy Saunders
Jeremy Saunders
Jeremy Saunders
  • Pingback: How to prevent certain MS Outlook dialog boxes from showing « SysadminRay()

  • Khristian

    Dear J Houst Consulting,
    So when this bar of script shown, what should I choose then, and what is the next implication if I choose Yes and same for”No”
    Thank you

    • Jeremy

      Hi Khristian,

      I assume you’re asking about the RSS Feeds dialog box. The answer would depend on whether or not you use RSS Feeds in Outlook. The Common Feed List is a shared feed list between Outlook and Internet Explorer. If you select “Yes”, then any new feeds added to either Outlook or Internet Explorer automatically display in both applications.

      Cheers,
      Jeremy

  • Khristian

    Hi Jeremy,
    So in other word you reccomend me to choose the “Yes” option. Could I say by that way.

    Cheers,
    Khristian

    • Jeremy

      Hi Khristian,

      If you use RSS feeds, then I would suggest selecting Yes.

      Cheers,
      Jeremy

  • Khristian

    Dear Jeremy,

    Could you give me more explanation related to RSS Feeds in Outlook. Since I am just a simplify user of Outlook without any expert of IT stuff.

    Your sincerly,

    Khristian.

    • Jeremy

      Hi Khristian,

      You probably need to Google “Outlook RSS Feed” and do some research as to what it is and how to use it, and understand whether or not it’s something that would provide value to yourself. I don’t know your situation, nor am I an Outlook trainer, so I wouldn’t want to mislead you in any way.

      Cheers,
      Jeremy

Previous post:

Next post: