#include <windows.h>
/**/
int WINAPI WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow
)
{
if (MessageBox(NULL, "Do you want to remove the Content Advisor password ?",
"Content Advisor Password Remover",
MB_YESNO | MB_ICONQUESTION) == IDYES)
{
HKEY hKey;
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Ratings", 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS)
{
if (RegQueryValueEx(hKey, "Key", NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
{
if (RegDeleteValue(hKey, "Key") == ERROR_SUCCESS)
MessageBox(NULL,
"The Content Advisor password was successfully removed from you system.",
"Content Advisor Password Remover",
MB_ICONINFORMATION | MB_OK);
else
MessageBox(NULL,
"Unable to remove the Content Advisor password.",
"Content Advisor Password Remover",
MB_ICONEXCLAMATION | MB_OK);
} else
MessageBox(NULL,
"The Content Advisor is not protected by password",
"Content Advisor Password Remover",
MB_ICONEXCLAMATION | MB_OK);
} else
MessageBox(NULL,
"Unable to access the password in the registry.",
"Content Advisor Password Remover",
MB_ICONEXCLAMATION | MB_OK);
}
return 0;
}
|