Смекни!
smekni.com

Настройка Windows по средствам системного реестра (стр. 5 из 8)

CheckBox37: TCheckBox;

CheckBox38: TCheckBox;

CheckBox39: TCheckBox;

CheckBox40: TCheckBox;

CheckBox41: TCheckBox;

CheckBox42: TCheckBox;

CheckBox43: TCheckBox;

ComboBox2: TComboBox;

CheckBox46: TCheckBox;

CheckBox22: TCheckBox;

ComboBox1: TComboBox;

CheckBox47: TCheckBox;

CheckBox48: TCheckBox;

CheckBox49: TCheckBox;

CheckBox55: TCheckBox;

CheckBox54: TCheckBox;

CheckBox53: TCheckBox;

CheckBox52: TCheckBox;

CheckBox51: TCheckBox;

CheckBox50: TCheckBox;

CheckBox56: TCheckBox;

CheckBox57: TCheckBox;

CheckBox58: TCheckBox;

CheckBox59: TCheckBox;

CheckBox60: TCheckBox;

CheckBox61: TCheckBox;

CheckBox62: TCheckBox;

CheckBox63: TCheckBox;

CheckBox21: TCheckBox;

Image1: TImage;

Image2: TImage;

Image3: TImage;

Image4: TImage;

Image5: TImage;

Image6: TImage;

Image7: TImage;

Image8: TImage;

Image9: TImage;

Label1: TLabel;

Label2: TLabel;

Label3: TLabel;

Label4: TLabel;

Label5: TLabel;

Label6: TLabel;

Label7: TLabel;

Label8: TLabel;

Label9: TLabel;

Bevel1: TBevel;

Bevel2: TBevel;

Bevel3: TBevel;

Bevel4: TBevel;

Bevel5: TBevel;

Bevel6: TBevel;

Bevel7: TBevel;

Bevel8: TBevel;

Bevel9: TBevel;

Label11: TLabel;

Label10: TLabel;

Label12: TLabel;

Label13: TLabel;

Label14: TLabel;

Label15: TLabel;

Label16: TLabel;

Label17: TLabel;

Label18: TLabel;

Bevel10: TBevel;

Bevel11: TBevel;

Bevel12: TBevel;

Bevel13: TBevel;

Bevel14: TBevel;

Bevel15: TBevel;

Bevel16: TBevel;

Bevel17: TBevel;

Panel1: TPanel;

Image10: TImage;

Button1: TButton;

Button2: TButton;

Button3: TButton;

OpenPictureDialog1: TOpenPictureDialog;

SavePictureDialog1: TSavePictureDialog;

procedure FormShow(Sender: TObject);

procedure FormClose(Sender: TObject; var Action: TCloseAction);

procedure CheckBox33Click(Sender: TObject);

procedure CheckBox21Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

procedure Button1Click(Sender: TObject);

private

th1,th2,th3: Cardinal;

h1,h2,h3: Integer;

fstart: Boolean;

end;

procedure Execute1;

procedure Execute2;

procedure Execute3;

var

Form1: TForm1;

implementation

uses MiniReg;

{$R *.dfm}

procedure Execute1;

var f: Boolean; d,d1,d2: DWORD; s,s1,s2: String; a1,a0: array of Byte;

begin

SetLength(a1,1); SetLength(a0,1); a1[0] := 1; a0[0] := 0;

while true do begin

f := (Form1.PageControl1.ActivePageIndex <> 0);

if f or(Form1.PageControl2.ActivePageIndex<>0)

or Form1.fstart then begin

RegGetDWORD(HKEY_LOCAL_MACHINE,

ClearPageFileAtShutdown, d);

Form1.CheckBox1.Checked := (d > 0); d := 0;

RegGetString(HKEY_LOCAL_MACHINE,

DebugDrWatsonAuto, s);

Form1.CheckBox2.Checked := (s <> '') and (s = '0');

RegGetDWORD(HKEY_LOCAL_MACHINE,

AlwaysUnloadDLL, d);

Form1.CheckBox3.Checked := (d > 0); d := 0;

RegGetDWORD(HKEY_CURRENT_USER,

NoInstrumentation, d);

Form1.CheckBox4.Checked := (d > 0); d := 0;

RegGetString(HKEY_LOCAL_MACHINE,

DefaultSeparateVDM, s);

Form1.CheckBox5.Checked := (s = 'yes');

RegGetDWORD(HKEY_LOCAL_MACHINE, DoReport,

d1);

RegGetDWORD(HKEY_LOCAL_MACHINE, ShowUI, d2);

Form1.CheckBox6.Checked := (d1 = 0) or (d2 = 0);

RegGetString(HKEY_LOCAL_MACHINE,

BootOptimizeFunction, s);

Form1.CheckBox8.Checked := (s <> '')and(s = 'Y');

RegGetDWORD(HKEY_CURRENT_USER,

ConsoleQuickEdit, d);

Form1.CheckBox9.Checked := (d > 0); d := 0;

end

else begin

if Form1.CheckBox1.Checked then

RegSetDWORD(HKEY_LOCAL_MACHINE,

ClearPageFileAtShutdown, 1)

else RegSetDWORD(HKEY_LOCAL_MACHINE,

ClearPageFileAtShutdown, 0);

if Form1.CheckBox2.Checked then

RegSetString(HKEY_LOCAL_MACHINE,

DebugDrWatsonAuto, '0')

else RegSetString(HKEY_LOCAL_MACHINE,

DebugDrWatsonAuto, '1');

if Form1.CheckBox3.Checked then

RegSetDWORD(HKEY_LOCAL_MACHINE,

AlwaysUnloadDLL, 1)

else RegSetDWORD(HKEY_LOCAL_MACHINE,

AlwaysUnloadDLL, 0);

if Form1.CheckBox4.Checked then

RegSetDWORD(HKEY_CURRENT_USER,

NoInstrumentation, 1)

else RegSetDWORD(HKEY_CURRENT_USER,

NoInstrumentation, 0);

if Form1.CheckBox5.Checked then

RegSetString(HKEY_LOCAL_MACHINE,

DefaultSeparateVDM, 'yes')

else RegSetString(HKEY_LOCAL_MACHINE,

DefaultSeparateVDM, 'no');

if Form1.CheckBox6.Checked then begin

RegSetDWORD(HKEY_LOCAL_MACHINE, DoReport,

0);

RegSetDWORD(HKEY_LOCAL_MACHINE, ShowUI, 0);

end

else begin

RegSetDWORD(HKEY_LOCAL_MACHINE, DoReport,

1)

RegSetDWORD(HKEY_LOCAL_MACHINE, ShowUI, 1); end;

if Form1.CheckBox8.Checked then

RegSetString(HKEY_LOCAL_MACHINE,

BootOptimizeFunction, 'Y')

else RegSetString(HKEY_LOCAL_MACHINE,

BootOptimizeFunction, 'N');

if Form1.CheckBox9.Checked then

RegSetDWORD(HKEY_CURRENT_USER,

ConsoleQuickEdit, 1)

else RegSetDWORD(HKEY_CURRENT_USER,

ConsoleQuickEdit, 0);

end;

if f or(Form1.PageControl2.ActivePageIndex<>1)

or Form1.fstart then begin

RegGetDWORD(HKEY_CURRENT_USER,

NoLowDiskSpaceChecks, d);

Form1.CheckBox12.Checked := (d > 0);

RegGetString(HKEY_CURRENT_USER, MinAnimate, s);

Form1.CheckBox13.Checked := (s <> '') and (s = '1');

RegGetDWORD(HKEY_CURRENT_USER,

SeparateProcess, d);

Form1.CheckBox14.Checked := (d > 0);

RegGetDWORD(HKEY_LOCAL_MACHINE,

AutoRestartShell, d);

Form1.CheckBox15.Checked := (d > 0);

RegGetBinary(HKEY_CURRENT_USER, LinkImg, s);

Form1.CheckBox17.Checked := (ord(s[1]) = 0); s := '';

RegGetBinary(HKEY_CURRENT_USER, NoSaveSettings,

s);

Form1.CheckBox18.Checked := (s <> '') and (s = '0'); s := '';

RegGetString(HKEY_CURRENT_USER, DragFullWindows,

s);

Form1.CheckBox19.Checked := (s <> '') and (s = '1');

end

else begin

if Form1.CheckBox12.Checked then

RegSetDWORD(HKEY_CURRENT_USER,

NoLowDiskSpaceChecks, 1)

else RegSetDWORD(HKEY_CURRENT_USER,

NoLowDiskSpaceChecks, 0);

if Form1.CheckBox13.Checked then

RegSetString(HKEY_CURRENT_USER, MinAnimate, '1')

else RegSetString(HKEY_CURRENT_USER, MinAnimate,

'0');

if Form1.CheckBox14.Checked then

RegSetDWORD(HKEY_CURRENT_USER,

SeparateProcess, 1)

else RegSetDWORD(HKEY_CURRENT_USER,

SeparateProcess, 0);

if Form1.CheckBox15.Checked then

RegSetDWORD(HKEY_LOCAL_MACHINE,

AutoRestartShell, 1)

else RegSetDWORD(HKEY_LOCAL_MACHINE,

AutoRestartShell, 0);

if Form1.CheckBox17.Checked then

RegSetBinary(HKEY_CURRENT_USER, LinkImg, a0)

else RegSetBinary(HKEY_CURRENT_USER, LinkImg, a1);

if Form1.CheckBox18.Checked then

RegSetBinary(HKEY_CURRENT_USER,

NoSaveSettings, a1)

else RegSetBinary(HKEY_CURRENT_USER,

NoSaveSettings, a0);

if Form1.CheckBox19.Checked then

RegSetString(HKEY_CURRENT_USER,

DragFullWindows, '1')

else RegSetString(HKEY_CURRENT_USER,

DragFullWindows, '0');

end;

if f or(Form1.PageControl2.ActivePageIndex<>2)

or Form1.fstart then begin

RegGetDWORD(HKEY_CURRENT_USER,

EnableBalloonTips, d);

Form1.CheckBox22.Checked := (d > 0);

RegGetDWORD(HKEY_CURRENT_USER,

TaskbarGlomming, d);

Form1.CheckBox21.Checked := (d > 0);

Form1.ComboBox1.Enabled := (d > 0);

RegGetDWORD(HKEY_CURRENT_USER,

TaskbarGroupSize, d);

Form1.ComboBox1.ItemIndex := Integer(d);

RegGetDWORD(HKEY_CURRENT_USER,

NoRecentDocsHistory, d);

Form1.CheckBox20.Checked := (d > 0);

RegGetDWORD(HKEY_CURRENT_USER,

Start_AutoCascade, d);

Form1.CheckBox23.Checked := (d > 0);

RegGetDWORD(HKEY_CURRENT_USER,

NoCommonGroups, d);

Form1.CheckBox24.Checked := (d > 0);

RegGetString(HKEY_CURRENT_USER,

StartMenuScrollPrograms, s);

Form1.CheckBox25.Checked := (s <> '') and (s = 'YES');

RegGetDWORD(HKEY_CURRENT_USER, IntelliMenus,

d);

Form1.CheckBox26.Checked := (d > 0);

RegGetDWORD(HKEY_CURRENT_USER,

StartMenuChange, d);

Form1.CheckBox28.Checked := (d > 0);

end

else begin

if Form1.CheckBox22.Checked then

RegSetDWORD(HKEY_CURRENT_USER,

EnableBalloonTips, 1)

else RegSetDWORD(HKEY_CURRENT_USER,

EnableBalloonTips, 0);

if Form1.CheckBox21.Checked then

RegSetDWORD(HKEY_CURRENT_USER,

TaskbarGlomming, 1)

else RegSetDWORD(HKEY_CURRENT_USER,

TaskbarGlomming, 0);

RegSetDWORD(HKEY_CURRENT_USER,

TaskbarGroupSize, DWORD(Form1.ComboBox1.ItemIndex));

if Form1.CheckBox20.Checked then

RegSetDWORD(HKEY_CURRENT_USER,

NoRecentDocsHistory, 1)

else RegSetDWORD(HKEY_CURRENT_USER,

NoRecentDocsHistory, 0);

if Form1.CheckBox23.Checked then

RegSetDWORD(HKEY_CURRENT_USER,

Start_AutoCascade, 1)

else RegSetDWORD(HKEY_CURRENT_USER,

Start_AutoCascade, 0);

if Form1.CheckBox24.Checked then

RegSetDWORD(HKEY_CURRENT_USER,

NoCommonGroups, 1)

else RegSetDWORD(HKEY_CURRENT_USER,

NoCommonGroups, 0);

if Form1.CheckBox25.Checked then

RegSetString(HKEY_CURRENT_USER,