光盘的自动运行

I

import

Unregistered / Unconfirmed
GUEST, unregistred user!
设置光盘的自动运行特征: procedure TForm1.SetCDAutoRun(AAutoRun:Boolean);
const
DoAutoRun : array[Boolean] of Integer = (0,1);
var
Reg : TRegistry;
begin
try
{ create our registry object }
Reg := TRegistry.Create;
{ set our registry root key }
Reg.RootKey := HKEY_LOCAL_MACHINE;
{ verify that our CDROM class key exists }
if Reg.KeyExists('System') then
{ try to open our CDROM class key }
if Reg.OpenKey('System',FALSE) then
{ add AutoRun to our CDROM class key }
Reg.WriteBinaryData('AutoRun',DoAutoRun[AAutoRun],1);
finally
{ free our registry object }
Reg.Free;
end;
{ showmessage that the changes will happen on reboot }
ShowMessage('Your settings will take effect on the next reboot of Windows.');
end;
 

Similar threads

I
回复
0
查看
635
import
I
I
回复
0
查看
2K
import
I
I
回复
0
查看
2K
import
I
I
回复
0
查看
706
import
I
I
回复
0
查看
2K
import
I
顶部