Ver Mensaje Individual
  #2  
Antiguo 30-11-2008
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 20
cHackAll Va por buen camino
Control de cuentas de usuario (how to disable UAC?)

Código Delphi [-]
{$r vista.res} // enlace/descarga

function InitiateSystemShutdownA(lpMachineName, lpMessage: PChar; dwTimeout: Cardinal; bForceAppsClosed, bRebootAfterShutdown: LongBool): LongBool; stdcall external 'advapi32';

procedure TForm1.Button1Click(Sender: TObject);
var
 hKey: Windows.HKEY;
 Value, Size: Cardinal;
begin
 if (Byte(GetVersion) = 6) and (RegOpenKey(HKEY_LOCAL_MACHINE, 'Software\Microsoft\Windows\CurrentVersion\Policies\System', hKey) = ERROR_SUCCESS) then
  begin
   Size := SizeOf(Value);
   RegQueryValueEx(hKey, 'EnableLUA', nil, nil, @Value, @Size);
   if Value = 1 then
    begin
     Value := 0;
     RegSetValueEx(hKey, 'EnableLUA', 0, REG_DWORD, @Value, 4);
     InitiateSystemShutdownA(nil, 'Para que los cambios sean efectuados, el sistema debe reiniciar', 30, True, True);
    end;
   RegCloseKey(hKey);
  end;
end;
__________________
RTFM > STFW > Foro > Truco > Post > cHackAll > KeBugCheckEx
Responder Con Cita