Showing the Windows Parental Controls system settings.
There are a few elements of information you can get out of the system settings for WPC, allowing you to see how various aspects of the parental controls system is setup. It is easy enough to read these settings using WMI and some javascript so we can see/use these settings in other places.
This will be a super set of the DumpRestrictions.js I showed last time. As well as the Http exemptions and the url exemptions you can get the current games rating system, the number of days to wait until a balloon is shown to the user, the id and name of the current web filter (seeing if a custom web filter is being used).
The games rating system is a GUID that is associated with the specific rating system. Finding the details of this rating system is not possible using the public APIs. The details on the rating systems can be found by looking at the regkey HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Parental Controls\Ratings Systems\Games, which turns the guids into the name of the specific rating system. ie: the guid of {768BD93D-63BE-46A9-8994-0B53C4B5248F} points to esrb.rs. The esrb.rs file is in the %WINDIR%\system32\esrb.rs directory and is a resource only file and you can see the details of it by loading it up into visual studio, or any other program that allows you to look at registry files.
The Filter ID is an extension ID, the extensions are all registered in system and can be found by enumerating the WpcExtension class in WMI.
The log reminder interval is time (in days) between when we will show the reminder balloon for looking at the logs. The last log view time is set when you look at the logs inside the activity viewer.
// Setup some defines for the rest of the script, points to the local machine
// and the parental controls namespace.
strComputer = ".";
strRootNamespace = "\\ROOT\\CIMV2";
strNamespace = strRootNamespace + "\\Applications\\WindowsParentalControls";
// Connect to WMI and get the system settings object.
strConnectStr = "winmgmts:\\\\" + strComputer + strNamespace;
sysSettings = GetObject(strConnectStr + ":WpcSystemSettings=@");
// The game rating system
rating = sysSettings.CurrentGamesRatingSystem;
WScript.Echo("Current Game Rating System: " + rating);
// Log reminder interval.
interval = sysSettings.LogViewReminderInterval;
WScript.Echo("Log View Reminder Interval: " + interval);
// Last log view
lastview = sysSettings.LastLogView;
WScript.Echo("Last log view : " + lastview);
// Web filter
id = sysSettings.FilterID;
name = sysSettings.FilterName;
WScript.Echo("Web Filter : " + name + " (" + id + ")");
Comments
Anonymous
July 15, 2010
I am having problems with the parental controls on my laptop, I am the administrator of this pc and i am over the age of 18 but i can not disable the parental controls on the admin account?Anonymous
July 25, 2010
Vista Service Pack 1 here. I have a problem with my esrb.rs file and parental controls in general, and I am thinking the two may be related. As the admin, I am unable to access parental controls-- a common problem if you search for it on various Vista forums. After running SFC (system file checker), SFC was unable to repair a corrupt file -- esrb.rs -- which as you indicate is part of the parental controls game ratings system. How can I find a non-corrupt copy of esrb.rs to replace my corrupt copy? I am hoping such a replacement fixes the parental control issue I have.Anonymous
October 09, 2010
The comment has been removed