mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Bug [0000622] "Disable request to choose default application for opening "exe" files"
This commit is contained in:
parent
1f3ba94b96
commit
a21be17676
1 changed files with 11 additions and 4 deletions
|
|
@ -319,10 +319,17 @@ end;
|
|||
|
||||
function ShellExecute(URL: UTF8String): Boolean;
|
||||
{$IF DEFINED(MSWINDOWS)}
|
||||
var
|
||||
Return: HINST;
|
||||
wsFileName: WideString;
|
||||
begin
|
||||
Result:= ExecCmdFork(Format('"%s"', [URL]));
|
||||
if Result = False then
|
||||
Result:= ExecCmdFork('rundll32 shell32.dll OpenAs_RunDLL ' + URL);
|
||||
URL:= NormalizePathDelimiters(URL);
|
||||
wsFileName:= UTF8Decode(QuoteDouble(URL));
|
||||
Return:= ShellExecuteW(0, nil, PWideChar(wsFileName), nil, nil, SW_SHOWNORMAL);
|
||||
if Return = SE_ERR_NOASSOC then
|
||||
Result:= ExecCmdFork('rundll32 shell32.dll OpenAs_RunDLL ' + URL)
|
||||
else
|
||||
Result:= Return > 32;
|
||||
end;
|
||||
{$ELSEIF DEFINED(DARWIN)}
|
||||
var
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue