| Author |
Message |
luq_h |
| Location: |
|
Post subject: WriteString in HKLM (registry)
Posted: 23/May/2011 16:51
|
|
onConfident

Joined: 23-Apr-2011
Posts: 16
Status: Offline
|
|
salam Delphi,,, hehe
para master awam mau tanya ni...
sy mo buat konfigurasi aplikasi startup[yes/no], t coba nulis string registry di HKLM g bsa? ko error ada pesan
Project xxx.exe raised exception class ERegistryException with message 'Failed to set data for 'MMS_TA''
kalo aq coba2 buat string lain di HKCU bisa,,,
apa masalahnya??
sy pake delphi 2010, windows 7
code : pascal if CheckBox1.Checked=true then with TRegistry.Create do try RootKey := HKEY_LOCAL_MACHINE; OpenKey('\SOFTWARE\Microsoft\Windows\CurrentVersion\Run', True); WriteString('MMS_TA', Application.ExeName); CloseKey; finally Free; end else with TRegistry.Create do try RootKey := HKEY_LOCAL_MACHINE; OpenKey('\SOFTWARE\Microsoft\Windows\CurrentVersion\Run', True); DeleteValue('MMS_TA'); CloseKey; finally Free; end;
matur suwun sakderengipun salam delphi Indonesia!!! |
|
|
| |
|
|
|
 |
luq_h |
| Location: |
|
Post subject:
Posted: 24/May/2011 05:07
|
|
onConfident

Joined: 23-Apr-2011
Posts: 16
Status: Offline
|
|
ooo udah ketemu,,, ternyata di HKCU juga ada run,, kurang jeli nyarinya...
salam delphi Indonesia !!! |
|
|
| |
|
|
|
 |
|
|
|
|