18. september 2003 - 10:46
#1
uses registry
procedure TForm1.Button2Click(Sender: TObject);
begin
with TRegIniFile.Create('') do
try
RootKey := HKEY_CLASSES_ROOT;
WriteString('.newext', '', 'NewExt');
WriteString('NewExt', '', 'Your description of NewExt files');
WriteString('NewExt\DefaultIcon', '', 'C:\MyApp.Exe,0');
WriteString('NewExt\Shell', '', 'This_Is_Our_Default_Action');
WriteString('NewExt\Shell\First_Action', '','This is our first action');
WriteString('NewExt\Shell\First_Action\command', '', 'C:\MyApp.Exe /LotsOfParamaters %1');
WriteString('NewExt\Shell\This_Is_Our_Default_Action', '', 'This is our default action');
WriteString('NewExt\Shell\This_Is_Our_Default_Action\command', '', 'C:\MyApp.Exe %1');
WriteString('NewExt\Shell\Second_Action', '', 'This is our second action');
WriteString('NewExt\Shell\Second_Action\command', '', 'C:\MyApp.Exe /TonsOfParameters %1');
finally
Free;
end;
end;
Stoney