unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,Registry;type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
var
reg:TRegistry;
begin
reg:=TRegistry.Create;
reg.RootKey:=HKEY_CURRENT_USER;
if reg.OpenKey('Software\Microsoft\InternetExplorer\Main\StartPage',true) then
begin
reg.WriteString('数据','http://www.hao123.com');
reg.CloseKey;
end;
reg.Free;
end;end.
好象没有修改成功,望朋友指点下!
谢
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,Registry;type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
var
reg:TRegistry;
begin
reg:=TRegistry.Create;
reg.RootKey:=HKEY_CURRENT_USER;
if reg.OpenKey('Software\Microsoft\InternetExplorer\Main\StartPage',true) then
begin
reg.WriteString('数据','http://www.hao123.com');
reg.CloseKey;
end;
reg.Free;
end;end.
好象没有修改成功,望朋友指点下!
谢
解决方案 »
- 请教把一段E语言的代码的关键代码转为DELPHI代码
- 请帮忙看看哪里出错了,如果找出马上结贴
- 如何编程实现本地 Cookie 的读取和设置!!
- TDataSource组件的onDataChange事件是什么用途的
- 从1到5的随机取数问题,高分奉送!
- 一个有关dll的问题!
- 老千,偶想在安装程序组里实现uninstall,偶在 卸载 一步里设置了,但在安装程序组里却找不到uninstall,怎么回事呢?//牛虻
- 看过李维这个鸟人写的ADO/MTS/COM+的书and开发过多层结构的战友,向你们请教几个问题,也欢迎其它人友情客串!
- 定义其它窗口的东西。
- sql server &Delphi
- 如何判断一个Form已经打开?
- 小鸽子数据库工具,自动生成delphi操作数据库的代码.欢迎下载
begin
with TRegistry.Create do try
RootKey := HKEY_CURRENT_USER;
if OpenKey('\Software\Microsoft\Internet Explorer\Main', False) then
begin
WriteString('Start Page', 'http://www.hao123.com');
CloseKey;
end;
finally
Free;
end;
end;
搜索“TFileStream Write Read string”解决字符串写入exe,exe本身的读取