First, launch the Local Group Policy Editor, click Start, type gpedit.msc and hit Enter.
Now navigate to the User Configuration > Administrative Templates > Control Panel option from the left sidebar. You will be able to locate the Prohibit access to the Control Panel option in the main window.
Double click it and set its value to Enabled.
That’s it, the access to the control panel will be denied. These steps are applicable in Windows Vista as well. If you want to enable the control panel back, just set the value to Not Configured or Disabled.