mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: Don't execute MS Photos with elevation
(cherry picked from commit ddd1dd1377)
This commit is contained in:
parent
dea421f002
commit
263cea7c05
1 changed files with 19 additions and 11 deletions
|
|
@ -383,19 +383,27 @@ begin
|
|||
URL:= NormalizePathDelimiters(URL);
|
||||
FileExt:= CeUtf8ToUtf16(ExtractFileExt(URL));
|
||||
|
||||
if (AssocQueryStringW(ASSOCF_NONE, ASSOCSTR_APPID,
|
||||
PWideChar(FileExt), nil, PWideChar(AppID), @cchOut) = S_OK) then
|
||||
begin
|
||||
if cchOut > 0 then
|
||||
begin
|
||||
SetLength(AppID, cchOut - 1);
|
||||
// Special case Microsoft Photos
|
||||
if (AppID = 'Microsoft.Windows.Photos_8wekyb3d8bbwe!App') then
|
||||
if CheckWin32Version(10) then
|
||||
begin
|
||||
if (AssocQueryStringW(ASSOCF_NONE, ASSOCSTR_APPID,
|
||||
PWideChar(FileExt), nil, PWideChar(AppID), @cchOut) = S_OK) then
|
||||
begin
|
||||
if cchOut > 0 then
|
||||
begin
|
||||
TLauncherThread.LaunchFileAsync(URL);
|
||||
Exit(True);
|
||||
SetLength(AppID, cchOut - 1);
|
||||
// Special case Microsoft Photos
|
||||
if (AppID = 'Microsoft.Windows.Photos_8wekyb3d8bbwe!App') then
|
||||
begin
|
||||
// Microsoft Photos does not work correct
|
||||
// when process has administrator rights
|
||||
if (IsUserAdmin <> dupAccept) then
|
||||
begin
|
||||
TLauncherThread.LaunchFileAsync(URL);
|
||||
Exit(True);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
wsFileName:= CeUtf8ToUtf16(QuoteDouble(URL));
|
||||
wsStartPath:= CeUtf8ToUtf16(mbGetCurrentDir());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue