-- 찾기

  function FindForm(const FormName: string) : TForm;
  var
    i : Integer;
  begin
    Result:= nil;

    for i := 0 to Screen.FormCount - 1 do
    begin
      if 0 <> CompareText(Screen.Forms[i].ClassName, FormName) then Continue;
  
      Result := Screen.Forms[i];
      Break;
    end;
  end;


  
-- 체크  

  function CheckForm(const FormName: string) : boolean;
  var
    i : Integer;
  begin
    Result := False;
    for i := 0 to Screen.FormCount - 1 do
    begin
      Result := CompareText(Screen.Forms[i].ClassName, FormName) = 0;
      if Result then
        Break;
    end;
  end;

 

 

명령프롬프트를 관리자권한으로 실행 후

net user administrator /active:yes *


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\runas]
@="모든 권한 얻기"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\*\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

[HKEY_CLASSES_ROOT\exefile\shell\runas2]
@="모든 권한 얻기"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\exefile\shell\runas2\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="모든 권한 얻기"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"



+ Recent posts