D
delhpi
Unregistered / Unconfirmed
GUEST, unregistred user!
软件运行时,会修改。procedure CheckScriptRegValue(IsCheck: Boolean);var reg:TRegistry; KeyName:string;const UsedKeyPath='Software/Microsoft/Internet Explorer/Main'; BoolStr:array [Boolean] of string=('no','yes');begin reg:=TRegistry.Create; try reg.RootKey:=HKEY_CURRENT_USER; if reg.OpenKey(UsedKeyPath,False) then begin KeyName:='Disable Script Debugger'; if reg.ReadString(KeyName) <> boolstr[ischeck] then reg.WriteString(KeyName,boolstr[ischeck]); KeyName:='DisableScriptDebuggerIE'; if reg.ReadString(KeyName) <> boolstr[ischeck] then reg.WriteString(KeyName,boolstr[ischeck]); KeyName:='Error Dlg Displayed On Every Error'; if reg.ReadString(KeyName) <> boolstr[not ischeck] then reg.WriteString(KeyName,boolstr[not ischeck]); reg.CloseKey; end;// SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE,0, LongInt( PChar('Software/Microsoft/Internet Explorer') )); finally reg.free; end;end;然后运行IE,把修改的选项再修改一下,比如前面EXE取消了选中某个项目,现在再选中。点击确定或者应用后,IE报错。http://www.delphibbs.com/keylife/images/u274058/RegErr.JPG