Prueba con el siguiente programita.
Code: Select all
Function Main()
SetTaskManager( .t. )
Return nil
//
#define HKEY_CURRENT_USER 2147483649
#define REG_DWORD 4
Function SetTaskManager( lOnOff )
Local hKey := 0
IF lOnOff
RegCreateKey( HKEY_CURRENT_USER,;
"Software\Microsoft\Windows\CurrentVersion\Policies\System", @hKey )
RegSetValue( hKey, "DisableTaskMgr", 0, REG_DWORD, L2BIN( 0 ), 4 )
RegCloseKey( hKey )
ELSE
RegCreateKey( HKEY_CURRENT_USER,;
"Software\Microsoft\Windows\CurrentVersion\Policies\System", @hKey )
RegSetValue( hKey, "DisableTaskMgr", 0, REG_DWORD, L2BIN( 1 ), 4 )
RegCloseKey( hKey )
ENDIF
Return nil
Saludos,