new 0
DESCRIPTION
WIN7 LOCAL GROUP RESETTERTRANSCRIPT
RESET LOCAL GROUP: WINDOWS 7
' Created by: Shawn Brink' http://www.sevenforums.com' Tutorial: http://www.sevenforums.com/tutorials/214461-local-group-policy-reset-default.html
If WScript.Arguments.Count = 0 ThenSet objShell = CreateObject("Shell.Application")objShell.ShellExecute "wscript.exe", Chr(34) & WScript.ScriptFullName & Chr(34) & " Run", , "runas", 1Else
set winsh = CreateObject("WScript.Shell")set winenv = winsh.Environment("Process")windir = winenv("WinDir")strPath = (WinDir & "\System32\GroupPolicy")
DeleteFolder strPath
Function DeleteFolder(strFolderPath)Dim objFSO, objFolderSet objFSO = CreateObject ("Scripting.FileSystemObject")If objFSO.FolderExists(strFolderPath) ThenobjFSO.DeleteFolder strFolderPath, TrueEnd IfSet objFSO = NothingEnd Function
strPath = (WinDir & "\System32\GroupPolicyUsers")
DeleteFolder strPath
Function DeleteFolder(strFolderPath)Dim objFSO, objFolderSet objFSO = CreateObject ("Scripting.FileSystemObject")If objFSO.FolderExists(strFolderPath) ThenobjFSO.DeleteFolder strFolderPath, TrueEnd IfSet objFSO = NothingEnd Function
winsh.Run "gpupdate /force", 0
End If