Checks to see if the Local GPO hidden directory (%windir%\system32\grouppolicy) and the GPT.ini file have been created on the local computer. Script contributed by Microsoft's Mike Stephens and Judith Herman.

Visual Basic
'This script checks to see if a GPT.INI file has been created in the LGPO hidden directory:
'If this file exists we know the LGPO has been created.

'First find the windows directory which can be different on each machine

set wshshell = CreateObject("WScript.Shell")
windir = wshshell.ExpandEnvironmentStrings("%WINDIR%")

'Using the path relative to the windows directory look for the GPT.INI file

set objFSO = CreateObject("Scripting.FileSystemObject")
filename = windir & "\SYSTEM32\GROUPPOLICY\GPT.INI"

If objFSO.FileExists(filename) Then
    Wscript.Echo "Local GPO Exists"
    Wscript.Echo "Local GPO does not exist"
End If