program CheckCRC; uses Forms, Registry, Dialogs, Windows, SysUtils, Unit1 in 'Unit1.pas' {Form1}; {$R *.RES} var Reg: TRegistry; begin Application.Initialize; Reg:=TRegistry.Create; Reg.RootKey:= HKEY_LOCAL_MACHINE; if ParamStr(1)='/uninstall' then begin Reg.DeleteKey('\SOFTWARE\Classes\*\shell\CRC32'); Reg.DeleteKey('\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\CheckCRC'); MessageDlg('You must manually delete ' + ParamStr(0) + ' to remove CheckCRC completely from your system.' ,mtWarning,[mbOK],0); Reg.CloseKey; Reg.Free; Exit; end; if Reg.OpenKey('\SOFTWARE\Classes\*\shell\CRC32\command',True) then Reg.WriteString('','"' + ParamStr(0) + '" "%1"'); if Reg.OpenKey ('\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\CheckCRC',True) then begin Reg.WriteString('DisplayName','CRC32 Calculator - CheckCRC'); Reg.WriteString('UninstallString',ParamStr(0) + ' /uninstall'); end; Reg.CloseKey; Reg.Free; Application.CreateForm(TForm1, Form1); Form1.Show; if (ParamCount > 0) and FileExists(ParamStr(1)) then Form1.AnalyzeFile(ParamStr(1)); Application.Run; end.