This step-by-step article discusses how to turn off specific FrontPage 2003 commands for all Windows XP and Windows 2000 domain clients by using a sample Windows Script Host (WSH) script and a Group Policy object (GPO).
Note
This article discusses making Group Policy changes at
the domain level. You must always test
domain-level Group Policy settings in a test environment
before you make changes to your domain.
Disable Certain FrontPage 2003 Commands by Using a GPO
and a WSH Script
To disable certain
FrontPage 2003 commands by using a GPO and a WSH script,
you must create the sample script. You must then copy
the sample script to the logon scripts folder of the
default domain policy, configure the sample script as
the logon script, and then test the sample script from a
client computer.
Create the Sample Script
To create the sample script:
Option Explicit
' Continue if errors occur
On Error Resume Next
' declare our variables
Dim objFP
Dim objCommandBar
Dim objControl
' **************************************************
' This section checks to see if FrontPage is
' installed, and exits if it is not installed.
' **************************************************
' get a FrontPage Application object
Set objFP = WScript.CreateObject("FrontPage.Application")
' exit if the object does not exist
If Err.Number = -2147352567 Then WScript.Quit
' **************************************************
' This section disables inserting Web components.
' **************************************************
' get the 'Insert' command bar
Set objCommandBar = objFP.Application.CommandBars("Insert")
' get the 'Web Component' control
Set objControl = objCommandBar.Controls("&Web Component...")
' disable it
objControl.Enabled = False
' **************************************************
' This section disables changing themes.
' **************************************************
' get the 'Format' command bar
Set objCommandBar = objFP.Application.CommandBars("Format")
' get the 'Theme' control
Set objControl = objCommandBar.Controls("T&heme...")
' disable it
objControl.Enabled = False
' **************************************************
' This section disables modifying the toolbars, changing
' Web settings or permissions, and running macros.
' **************************************************
' get the 'Tools' command bar
Set objCommandBar = objFP.Application.CommandBars("Tools")
' get the 'Customize' control
Set objControl = objCommandBar.Controls("&Customize...")
' disable it
objControl.Enabled = False
' get the 'Web Settings' control
Set objControl = objCommandBar.Controls("&Web Settings...")
' disable it
objControl.Enabled = False
' get the 'Server' control
Set objControl = objCommandBar.Controls("Ser&ver")
' disable it
objControl.Enabled = False
' get the 'Macro' control
Set objControl = objCommandBar.Controls("&Macro")
' disable it
objControl.Enabled = False
' **************************************************
' This section cleans up and exits.
' **************************************************
Set objFP = Nothing
WScript.Quit
To use the sample script with the Default Domain policy, determine the GUID for the GPO. Follow these steps:
%SystemRoot%\SYSVOL\sysvol\Domain \Policies\GUID\User\Scripts\Logon
To configure the sample script as a logon script, follow these steps:
To test the sample script, follow these steps:
To troubleshoot issues that may occur, follow these steps:
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
Microsoft Office FrontPage 2003, when used with:
Microsoft Knowledge Base Article - 825446