mirror of
https://bitbucket.org/grumdrig/pq.git
synced 2026-09-29 08:44:00 -06:00
Ignore exceptions when setting file associations, for Win 7 users
without admin privs
This commit is contained in:
@@ -199,6 +199,7 @@ var
|
|||||||
kOpenCommand: String;
|
kOpenCommand: String;
|
||||||
begin
|
begin
|
||||||
kOpenCommand := '"' + Application.ExeName + '" "%1"';
|
kOpenCommand := '"' + Application.ExeName + '" "%1"';
|
||||||
|
try
|
||||||
RegWrite(HKEY_CLASSES_ROOT, kFileExt,'', kPQFileType);
|
RegWrite(HKEY_CLASSES_ROOT, kFileExt,'', kPQFileType);
|
||||||
RegWrite(HKEY_CLASSES_ROOT, kPQFileType, '', 'Progresss Quest saved game');
|
RegWrite(HKEY_CLASSES_ROOT, kPQFileType, '', 'Progresss Quest saved game');
|
||||||
RegWrite(HKEY_CLASSES_ROOT, kPQFileType + '\DefaultIcon', '', Application.ExeName + ',0');
|
RegWrite(HKEY_CLASSES_ROOT, kPQFileType + '\DefaultIcon', '', Application.ExeName + ',0');
|
||||||
@@ -209,6 +210,11 @@ begin
|
|||||||
// I don't do this unless I'm sure this one has changed.
|
// I don't do this unless I'm sure this one has changed.
|
||||||
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nil, nil);
|
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nil, nil);
|
||||||
end;
|
end;
|
||||||
|
except
|
||||||
|
on Exception do begin
|
||||||
|
// Don't care
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainForm.MinimizeIt;
|
procedure TMainForm.MinimizeIt;
|
||||||
|
|||||||
Reference in New Issue
Block a user