怎么读注册表的值
来源:互联网 发布:paragon ntfs foe mac 编辑:程序博客网 时间:2024/04/20 12:03
读注册表的时候要引用到Registry这个单元 下面的代码是实现把指定数据库按当天日期备份到SQL安装目录下的备份目录下
var
vRegPath: TRegistry;
vPath: string;
vCommand: TADOCommand;
begin
vCommand := TADOCommand.Create(nil);
vRegPath := TRegistry.Create;
try
vRegPath.RootKey := HKEY_LOCAL_MACHINE;
vRegPath.OpenKey('Software\Microsoft\MSSQLServer\MSSQLServer', False);
vPath := vRegPath.ReadString('BackupDirectory');
vPath := vPath + '\' + DateToStr(Now) + '.BAK';
vCommand.ConnectionString := DBService.GetConnectionString;
vCommand.CommandTimeout := 10000;
vCommand.CommandText := Format(vSQL, ['Test', vRegPath]);
vCommand.Execute;
finally
vRegPath.Free;
vCommand.Free;
end;
- 怎么读注册表的值
- 怎么打开注册表
- win7怎么打开注册表
- Windows内核:读注册表键的值
- WindowsXP的注册表被锁了怎么解开呀
- 键盘没用了怎么进入Win7系统的注册表?
- 怎么注册DLL到注册表
- 怎么破解她的限制次数?? 这是两次注册表的对比
- windows注册表--注册表的认识
- 读注册表
- 怎么用注册表修改启动项?
- vc++怎么删除软件注册表信息
- Win7怎么进入注册表(regedit)
- SQL server2008卸载怎么清理注册表
- C#注册表的读,写,删除,查找
- C#注册表的读,写,删除,查找
- C#注册表的读,写,删除,查找
- 读注册表 KEY_ALL_ACCESS 访问失败的原因
- WiFi网络操作学习
- 黑马程序员-字符串函数
- 2011-12-1 成都 w q 面试题
- 关于iCloud的注册,到代码的实现
- 消息以中文字符同步到UI上
- 怎么读注册表的值
- 怎么样才能遍历一个目录跟其下的子目录(以二种方式实现
- 运行一个文件并等待文件运行完成
- SendMessage跟PostMessage消息的异同
- 网络字节序与主机字节序
- DataTime时间转换成FileTime时间
- PCA的C语言代码
- 关于Steam的CopyFrom操作
- android 空间获取焦点