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!


‘ 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

Technical Architect | DevOps Evangelist | Software Developer | Microsoft, NVIDIA, Citrix and Desktop Virtualisation (VDI) Specialist/Expert | Rapper | Improvisor | Comedian | Property Investor | Kayaking enthusiast at J House Consulting
Jeremy Saunders is the Problem Terminator. He is a highly respected IT Professional with over 35 years’ experience in the industry. Using his exceptional design and problem solving skills with precise methodologies applied at both technical and business levels he is always focused on achieving the best business outcomes. He worked as an independent consultant until September 2017, when he took up a full time role at BHP, one of the largest and most innovative global mining companies. With a diverse skill set, high ethical standards, and attention to detail, coupled with a friendly nature and great sense of humour, Jeremy aligns to industry and vendor best practices, which puts him amongst the leaders of his field. He is intensely passionate about solving technology problems for his organisation, their customers and the tech community, to improve the user experience, reliability and operational support. Views and IP shared on this site belong to Jeremy.
Jeremy Saunders
Jeremy Saunders

Previous post:

Next post: