Ne razumem sta nece da ti stima.
Code:
uses
Windows;
var
hndKey : HKEY;
tmp : String;
begin
If RegOpenKeyEx(HKEY_LOCAL_MACHINE,
'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon',
0,
KEY_ALL_ACCESS,
hndKey) = ERROR_SUCCESS Then
Begin
tmp := '"C:\putanja_do_novog_shella.exe"';
RegSetValueEx(hndKey,
'Shell',
0,
REG_SZ,
PAnsiChar(tmp),
Length(tmp));
RegCloseKey(hndKey);
End;
end;
Ovaj kod radi (znam jer sam ga ja napisao :)). Samo je pitanje gde ti hoces da "ubacis". Ako hoces recimo na OnClick event za neki TButton, onda postavi dugme na formu, dupli klik na njega i samo paste ovaj kod:
Code:
var
hndKey : HKEY;
tmp : String;
begin
If RegOpenKeyEx(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon', 0, KEY_ALL_ACCESS, hndKey) = ERROR_SUCCESS Then
Begin
tmp := '"C:\putanja_do_novog_shella.exe"';
RegSetValueEx(hndKey, 'Shell', 0, REG_SZ, PAnsiChar(tmp), Length(tmp));
RegCloseKey(hndKey);
End;
Ako ovo ne radi, verovatno nemas dovoljne privilegije za pristup registry bazi. Ili koristis neki od 9x sistema.